-
Notifications
You must be signed in to change notification settings - Fork 96
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Regressors are linearly dependent #2
Comments
Ygor: On matrixengine I test if determinant of correlation matrix is 0 or near to On Mon, Mar 28, 2011 at 9:40 AM, Ygor <
Claudio Bustos |
If i comment out the line on 56, it goes wrong a bit further. It appears it cannot perform a linear regression. Any idea why excel can do it? |
On R appears the same problem. The predictors are linearly dependent between them, so R^2 is 1. |
Ok, thnx a lot for looking into this! |
No problem at all. |
With the following code, i get an error "matrixengine.rb:56:in `initialize': Regressors are linearly dependent (Statsample::Regression::LinearDependency)":
ds = Statsample::Dataset.new({
'a' => [5,5,4,5,5,2,2,4].to_scale,
'b' => [5,2,5,2,5,1,1,4].to_scale,
'c' => [4,5,2,4,5,2,1,4].to_scale,
'd' => [4,5,5,5,5,5,1,5].to_scale,
'e' => [5,4,1,5,1,5,4,2].to_scale,
'f' => [4,5,4,5,5,1,1,5].to_scale,
'g' => [4,2,4,4,5,5,4,1].to_scale,
'h' => [4,1,5,5,5,1,4,5].to_scale,
'i' => [4,2,2,1,4,5,5,5].to_scale
})
lr = Statsample::Regression.multiple(ds, 'a')
puts lr.summary
Any idea what is going on? (Excel does provide a linear regression)
The text was updated successfully, but these errors were encountered: