Re: [R] how to predict with logistic model in package logistf ?

From: jinlong li <lee_poet_at_hotmail.com>
Date: Fri 28 Oct 2005 - 10:35:40 EST


fit$predict does print the fitted value for training data frame,

but what I want is to apply the fitted model to new coming data.

maybe I can form the equation manually .

thank you!

jinlong

>From: Elizabeth Lawson <lizzylaws@yahoo.com>
>To: jinlong li <lee_poet@hotmail.com>
>CC: r-help@lists.R-project.org
>Subject: Re: [R] how to predict with logistic model in package logistf ?
>Date: Thu, 27 Oct 2005 08:19:49 -0700 (PDT)
>
>Did you try fit$predict?
>
>Elizabeth Lawson
>
>jinlong li <lee_poet@hotmail.com> wrote:
>dear community,
>I am a beginer in R , and can't predict with logistic model in package
>logistf,
>could anyone help me ? thanks !
>
>the following is my command and result :
>
> >library(logistf)
> >data(sex2)
> >fit<-logistf(case ~ age+oc+vic+vicl+vis+dia, data=sex2)
> >predict(fit,newdata=sex2)
>Error in predict(fit, newdata = sex2) : no applicable method for
>"predict"
>
>______________________________________________
>R-help@stat.math.ethz.ch mailing list
>https://stat.ethz.ch/mailman/listinfo/r-help
>PLEASE do read the posting guide!
>http://www.R-project.org/posting-guide.html
>
>
>---------------------------------
> Yahoo! FareChase - Search multiple travel sites in one click.



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Fri Oct 28 10:45:24 2005

This archive was generated by hypermail 2.1.8 : Fri 28 Oct 2005 - 12:14:26 EST