[R] NA when trying to calculate AIC value for DLNM

Prof Brian Ripley ripley at stats.ox.ac.uk
Mon Feb 9 18:24:39 CET 2015


On 09/02/2015 14:28, Malgosia Lubczynska wrote:
> Dear all,
>
> I am trying to run a sensitivity analysis for a DLNM combined with a case crossover design and select the best parameters based on AIC values for different model set-ups.
>
> model <- glm(mortality ~ cb.temp + ns(soo, 7*7) + dow, family=quasipoisson(), my.data)
>
> where cb.temp is the crossbasis matrix for the exposure (temperature)
>
> However, the output for the AIC calculations equals NA.
> Does anyone know how to obtain a correct AIC for a DLNM model?

To have an AIC you need to do maximum-likelihood fitting (and have a 
likelihood ...), something a quasi-Poisson fit does not give you.

>
> Thank you,
> Gosia
>
>
>   		 	   		
> 	[[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> 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.
>


-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Emeritus Professor of Applied Statistics, University of Oxford
1 South Parks Road, Oxford OX1 3TG, UK



More information about the R-help mailing list