[R] Strange predicted values ?

orkun temiz at deprem.gov.tr
Thu Aug 7 16:23:50 CEST 2003


Prof Brian Ripley wrote:

>On Thu, 7 Aug 2003, orkun wrote:
>
>[quoting me without attribution]
>
>  
>
>>>Those are not predicted values, they are fitted values.  Try predicting on 
>>>the same set of variables as you printed.
>>>      
>>>
>
>Precisely!  From ?predict.glm
>
> newdata: optionally, a new data frame from which to make the
>          predictions.  If omitted, the fitted linear predictors are
>          used.
>
>[...]
>
>  
>
>>If  predict(glm.obj,type="resp") does not give predicted vals, How can I 
>>get predicted values ?
>>    
>>
>
>Try reading the help page?  It is quite explicit, and has examples, as do 
>all good books on S/R.
>
>  
>
I tried this:
#I think since an interaction exists in glm.obj, data.frame.obj did not 
not work
#instead I used model.frame obj (it works)
newdata<-model.frame(glm.obj)
pr<-predict.glm(glm.obj,newdata,type="resp")
it works but there was a warning message:
prediction from a rank deficient fit may be misleading in predic.lm (....)

any suggestions ?

thank you again


______________________________________



______________________________________
The views and opinions expressed in this e-mail message are ...{{dropped}}




More information about the R-help mailing list