On 06/07/13 01:35, Yasmine Refai wrote:
> Hello,
>
> When I run the below syntax:
> *Trial<-read.table("Trial.txt",header=TRUE)*
> *Trial*
> *save.image(file="Trial.RData")*
> *load("Trial.RData")
> fit<-logistf(data=Trial, y~x1+x2)
> summary(fit)
> AIC(fit)*
>
> I am getting the below error:
> *> AIC(fit)
> Error in UseMethod("logLik") :
>   no applicable method for 'logLik' applied to an object of class 
> "logistf"
> *
> Can you please help with that?

You need to learn to crawl before you start trying to learn to walk.

(1) Your convoluted code is filled with redundancies and circularity.
Acquire some understanding of how R works before you plunge into
a modelling exercise.

(2) The logistf() function comes from the logistf package.  This needs to
be mentioned when you are asking for help with the function.

(3) The error message seems to me to be quite clear.  To calculate the AIC
one needs the log likelihood and this cannot be calculated.  This could 
be due
to the fact that log likelihood is not applicable to the model used by 
logistf(),
or simply to the fact that the package maintainer has not (yet?) written a
method logLik.logistf().  I don't know, not being familiar with "Firth's 
bias
reduced logistic regression" which is what the logistf package is about.

It is incumbent upon ***you*** to know since you are invoking the logistf
package.  If you don't know, do some study and find out.  You could also
try to contact the package maintainer.

(4) Your subject line is misleading.  You are simply replying to replies to
a previous query (which has really nothing to do with the current one)
and are apparently too lazy to start a new thread.

     cheers,

         Rolf Turner

        [[alternative HTML version deleted]]

______________________________________________
R-help@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.

Reply via email to