[R] How to use glm.predict properly

From: Diego Cesar <diegocfq_at_gmail.com>
Date: Tue, 25 Mar 2008 11:28:40 -0300

I'm having a little trouble with the glm.predict function. I read the other answers related to this question (the lm.predict question), but i'm still receiving the same warnings, then i thought i didnt got it right.

" 'newdata' had 87 rows but variable(s) found have 263 rows "


datamethod1 <- data.frame(method1) resultmethod1<- glm(Y ~ method1, binomial(link="probit"), data=datamethod1, control=glm.control(epsilon = 1e-8, maxit = 100, trace = FALSE))

prediction1 <- predict(resultmethod1, newdata=data.frame(testgroup), type="response", se.fit=TRUE)

Where 'method1' has 263 rows and 4 variables (columns) named:
"minx1" "maxx1" "minx2" "maxx2"

And 'testgroup' has 87 rows and the same 4 variables (columns) which have the same name.

So, i hope you guys can help me figure out what i am doing wrong.

thanks again


        [[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. Received on Tue 25 Mar 2008 - 15:58:43 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 25 Mar 2008 - 16:30:23 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive