
Thanks for the great library. I'd like to run a multivariate linear regression using MultivariateSample.LinearRegression(). Is it possible to fix the alpha parameter at 0? Thanks.


Coordinator
Feb 27, 2011 at 8:39 PM

I'm afraid there isn't a simple way to do this. If you just have one independent variable, you can put your data into a DataSet and use the DataSet.FitToProportionality method. But if your data really are multivariate, that isn't an option.
Probably the best way for us to deal with this would be to add a method to MultivariateSample that does regression to an arbitrary, usersupplied function. We will look into this for a future version.
By the way, statisticians are generally wary of proportional regression because it can display some perverse behaviors. For example, if the fit is poor, it can acutally occur that the postregression variance is larger that the preregression variance, i.e.
you have "negative rsquared". In most circumstances, a statistician would advise you to do a linear fit and consider the intercept to be a calibration of your measurement device. If you have a large number of data points and that do follow a proportionality
rule, then fitting to a linear function instead of a proportionality should make little difference: the intercept value will be zero within uncertainty, your Pvalue will remain significant, and the value of the slope won't change within uncertainty.

