Skip to content

QIC for conditional logistic regression + GEE

4 messages · Maarten de Groot, Mathieu Basille

#
Dear Timothy,

Thanks for the hint! I didn't know about the package "yags"... I was 
able to install it and use it in simple cases (glm), and it does provide 
a QIC!

However, it seems to be limited to the case of GLM (any family), but not 
Cox models... At least, I was unable to use it with a Cox model approach.

Last but not least, the routine that computes the QIC (pan.aic) is in C, 
not in R, and my skills in C are below zero.

Any idea?
Mathieu.


PS: I cc-ed back the list, since it could be useful there...




Le 09/11/2010 05:04, treid a ?crit :

  
    
#
Dear Matthieu,

Henric Nilsson 
(http://hisdu.sph.uq.edu.au/lsu/SSAI%20course/course_tools.htm) and 
Casper Kraan 
(http://www.waddenacademie.knaw.nl/fileadmin/inhoud/pdf/06-wadweten/Proefschriften/Thesis_Casper_Kraan.pdf) 
provide the R code for the QIC. Maybe this might be useful to you. 
Interestingly however is that the code of Nilsson gives another QIC 
output as you get from the "yags package.

Kind regards,

Maarten
On 11/9/2010 4:50 PM, Mathieu Basille wrote:
#
Dear Maarten,

Thank you for the links! They are very useful!

However, in both cases, they address the problem of QIC for GLMs, i.e. 
for parametric models. This said, I was unable to adjust the code for 
Cox models, which are semi-parametric, and use partial likelihood 
instead (which should behave similarly). In the end, I have no idea how 
to extract/compute the quasi partial likelihood for such a model, which 
is required for the QIC...

I'm still struggling a lot about QIC on coxph, any additional hint would 
be greatly appreciated!
Mathieu.


Le 10/11/2010 02:32, Maarten de Groot a ?crit :

  
    
#
Finally, I got a solution, with the help of Thierry Duchesne and Marc
Mazerolle. A coxph object returns a $loglik element, with 2 values, the
second being the quasi-likelihood (under R = I) to estimate the betas.

Here we are, we can thus write a simple function:

QIC <- function(mod, ...)
    UseMethod("QIC")

QIC.coxph <- function(mod, details = FALSE) {
    trace <- sum(diag(solve(mod$naive.var) %*% mod$var))
    quasi <- mod$loglik[2]
    return(-2*quasi + 2*trace)
}

which should just do the trick!
Mathieu.


Le 2010-11-10 10:17, Mathieu Basille a ?crit :