on 12-24-2014 7:11 AM
On selecting keep option in R-Multiple Linear Regression for handling missing values the following error came from R side
R-Multiple Linear Regression:An error occurred while executing commands in R environment
Details:
Cause:Error from R:"Error in lm.fit(x,y,offset=offset,singular.ok=singular.ok,..):
NA/Nan/Inf in 'X'
If SAP PA is passing na.action=na.pass than this will not work in R regression algorithms
That's why keep option for handling missing values is throwing following error
lm(ctl~trt,na.action=na.pass)
Error in lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) :
NA/NaN/Inf in 'x'
The above error is coming when I am running algo directly in R
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
What is the format of your dataset ?
I have the same error with PA with a .csv dataset.
So I open my dataset directly with R. The problem is empty values are not NULL but NA. Diffrences are explained here : http://www.r-bloggers.com/r-na-vs-null/
And I have the same error when I try to launch a regression with R.
I don't know how SAP Predictive Analysis read empty data.
My answer is not complete, but I hope it helps to understand the problem and helps someone else to fix it.
You can use InfiniteInsght regression if you want to keep empty values in your dataset.
Edouard
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Edouard KOLF for replying
I got your point SAP PA is sending NA values for Missing values.I tried the same multiple linear regression in R.When we read CSV in R it treats blank values as NA.
For handling NA values in lm function with na.action parameter we have to pass na.omit or na.exclude.But I don't know how sap is using this
For Ignore case they must be passing na.action=na.omit
For Stop case they must be passing na.action=na.fail
But for keep case I don't know what they are passing and why it is failing
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.