Hello together,

I would like to predict my fitted values on a new dataset. The original dataset 
consists of the variable a and b (data.frame(a,b)). The dataset for prediction 
consists of the same variables, but variable b has a constant value (x) added 
towards it (data.frame (a,b+x).

The prediction command returns the identical set of predicted values as for the 
original dataset yet I would have expected them to change due to b+x.

Were have I gone wrong?

Heres my code:

orig.frame<-data.frame(y,a,b)

pred.frame<-data.frame(a,b+x)

attach(orig.frame)

modela<-glm(y~a+b,binomial)

pr<-predict(modela,newdata=pred.frame,type="response")

many thanks

Chris


        



        [[alternative HTML version deleted]]

______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Reply via email to