Re: [R] Error of Stepwise Regression with number of rows in use has changed: remove missing values?

2010-02-22 Thread Kum-Hoe Hwang
--Original Message- >> From: r-help-boun...@r-project.org [mailto:r-help-boun...@r- >> project.org] On Behalf Of Kum-Hoe Hwang >> Sent: Wednesday, February 17, 2010 1:41 AM >> To: r-help@r-project.org >> Subject: Re: [R] Error of Stepwise Regression with number of rows

Re: [R] Error of Stepwise Regression with number of rows in use has changed: remove missing values?

2010-02-19 Thread Greg Snow
lf Of Kum-Hoe Hwang > Sent: Wednesday, February 17, 2010 1:41 AM > To: r-help@r-project.org > Subject: Re: [R] Error of Stepwise Regression with number of rows in > use has changed: remove missing values? > > I thank those who helped to solve a error in stepwise regression with &g

Re: [R] Error of Stepwise Regression with number of rows in use has changed: remove missing values?

2010-02-17 Thread Kum-Hoe Hwang
Sorry for my faulty email and another correct email I thank those who helped to solve a error in stepwise regression with missing values. A good solution that I have tried was Andreas's advice. = Try data<-na.omit(original dat

Re: [R] Error of Stepwise Regression with number of rows in use has changed: remove missing values?

2010-02-17 Thread Kum-Hoe Hwang
I thank those who helped to solve a error in stepwise regression with missing values. Kum * * A good solution that I have tried was Andreas's advice. = Try data<-na.omit(original database) before you run step() or stepAIC()

Re: [R] Error of Stepwise Regression with number of rows in use has changed: remove missing values?

2010-02-16 Thread Peter Ehlers
On 2010-02-16 1:24, Kum-Hoe Hwang wrote: Howdy, R Grues I have enjoyed R, but I cannot solve one problem easily. Please help my problem. When I tried the R script, I got the following Error. This error results from input data file exported through a Excel spreadsheet software. Error in step(l

Re: [R] Error of Stepwise Regression with number of rows in use has changed: remove missing values?

2010-02-16 Thread Mohamed Lajnef
Hi Kum, If you look at the code step function ( by typing step in the R console), the condition (if (length(fit$residuals) != n) ) is not fulfilled, this explains the error! i hope this can help Regards M Kum-Hoe Hwang a écrit : Howdy, R Grues I have enjoyed R, but I cannot solve one

[R] Error of Stepwise Regression with number of rows in use has changed: remove missing values?

2010-02-16 Thread Kum-Hoe Hwang
Howdy, R Grues I have enjoyed R, but I cannot solve one problem easily. Please help my problem. When I tried the R script, I got the following Error. This error results from input data file exported through a Excel spreadsheet software. Error in step(lm(pop.rate ~ as.numeric(year) + as.factor(po