[R] about lm()
Frank Schwidom
schwidom at gmx.net
Sun Mar 30 18:43:00 CEST 2014
Please provide some data from your variable data.
Show the output of dput( data) or an subset
of data which leads toe the specific error.
Regards
On Sun, Mar 30, 2014 at 02:23:09PM +0100, Si Qi L. wrote:
> Hi
>
> I have a problem with linear regression. This is my codes:
>
> acc1<- lm(data$acc ~ dummy + data$Reqloanamount + data$Code + data$Code.1 +
> data$EmpNetMonthlyPay + data$Customer_Age + data$RTI)
> summary(acc1)
>
> These attributes are all numerical except the "acc"(factors), so how can I
> fix the problem R showed me? can anyone please help me out? Many thanks!
>
> But the R shows:
>
> Residuals:Error in quantile.default(resid) : factors are not allowedIn
> addition: Warning message:In Ops.factor(r, 2) : ^ not meaningful for
> factors
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help
mailing list