[R] Poisson Regression

Charles C. Berry cberry at tajo.ucsd.edu
Thu Oct 14 02:51:08 CEST 2010


On Wed, 13 Oct 2010, David Winsemius wrote:

>
> On Oct 13, 2010, at 4:50 PM, Antonio Paredes wrote:
>
>> Hello everyone,
>> 
>> I wanted to ask if there is an R-package to fit the following Poisson
>> regression model
>> 
>> log(\lambda_{ijk}) = \phi_{i} + \alpha_{j} + \beta_{k}
>> i=1,\cdots,N (subjects)
>> j=0,1 (two levels)
>> k=0,1 (two levels)
>> 
>> treating the \phi_{i} as nuinsance parameters.
>
> If I am reading this piece correctly there should be no difference between a 
> conditional treatment of phi_i in  that model and results from the 
> unconditional model one would get from fitting with
>
> glm(lambda ~ phi + alpha + beta  ,family="poisson").

Right.

But if N is large, the model.matrix will be huge and there may be problems 
with memory and elapsed time.

loglin() and loglm() will fit the same model without need for a 
model.matrix (modulo having enough data to actually fit that model), and 
large values of N are no big deal.

HTH,

Chuck
>
> http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.6.9679&rep=rep1&type=pdf
>
> (But I am always looking for corrections to my errors.)
>
> -- 
> David Winsemius, MD
> West Hartford, CT
>
> ______________________________________________
> R-help at 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.
>

Charles C. Berry                            (858) 534-2098
                                             Dept of Family/Preventive Medicine
E mailto:cberry at tajo.ucsd.edu	            UC San Diego
http://famprevmed.ucsd.edu/faculty/cberry/  La Jolla, San Diego 92093-0901



More information about the R-help mailing list