commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Phil Steitz <>
Subject Re: [math] Help with OLSMultipleLinearRegression
Date Tue, 02 Aug 2011 19:57:40 GMT
On 8/2/11 12:24 PM, dan wrote:
> I have been using the OLSMultipleLinearRegression class successfully
> for a while now, but I am having trouble in my current application.
> The code is very simple, and looks like this:
> OLSMultipleLinearRegression regression = new OLSMultipleLinearRegression();
> regression.setNoIntercept(true);
> regression.newSampleData(ys, z_bars);
> double [] new_eta = regression.estimateRegressionParameters();
> When I run this code with my current data, all of the regression
> coefficients come back as NaNs.
> In the input data, the z_bars are vectors that have been normalized to
> sum to 1, and the ys are the logs of the "true" response variables (I
> am trying to reproduce the results from a research paper, in which it
> was claimed that logging the response variables made them more
> normally distributed, resulting in a better fit).  Is there something
> wrong with my setup?  It seems like, even if the logged data is not
> very linear, that it should still be possible to obtain some OLS fit,
> even if it is a poor one.  Any help would be appreciated.

Are you sure there are no NaNs in your input data?

> Thank you,
> Dan
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message