[R] Generalized linear model
Prof Brian Ripley
ripley at stats.ox.ac.uk
Mon Nov 17 16:01:53 CET 2003
The second fit appeared to use a dataframe and the first did not. Try
fit2<-glm(canc~id1+year1+time+lnpa,family=poisson, subset=-18)
On Mon, 17 Nov 2003, Marcos Sanches wrote:
>
> Hi all!
>
> I am fitting a Poisson model, using the following command:
>
> > fit2<-glm(canc~id1+year1+time+lnpa,family=poisson)
>
>
>
> where 'id1', 'year1' and 'time' are factors. I defined them with:
>
> > id1<-C(factor(id1), treatment)
>
> and 'lnpa' is a continuous variable.
>
> The 'summary' function gives me all the effects estimates, that is, for id1,
> I end up with estimates for id12, id13 and id14, the id11 is the reference
> level. That is fine, but when I try to fit the model without the point 18,
> using the command line:
>
> > fit2<-glm(canc~id1+year1+time+lnpa,family=poisson, subset(dat, order!=18))
>
> The 'summary' function stop to giving me the levels effect, and gives only
> one effect for id1, one for year1, one for time and one for lnpa. I want to
> have the parameters estimates for each level of each factor, as it was in
> the first fit. Also, I noticed the degree of freedom of deviance and the
> deviance itself has increased, so I cont't compare both models in terms of
> their deviance.
>
> What should I do to have each factor level effect as I had in the first
> case?
>
> Thanks
>
> Marcos
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-help
>
>
--
Brian D. Ripley, ripley at stats.ox.ac.uk
Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel: +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UK Fax: +44 1865 272595
More information about the R-help
mailing list