Re: [R] Estimate of intercept in loglinear model

2011-11-08 Thread Mark Difford
On Nov 08, 2011 at 11:16am Colin Aitken wrote: > An unresolved problem is: what does R do when the explanatory factors > are not defined as factors when it obtains a different value for the > intercept but the correct value for the fitted value? Colin, I don't think that happens (that the fit

Re: [R] Estimate of intercept in loglinear model

2011-11-08 Thread Colin Aitken
Sorry about that. However I have solved the problem by declaring the explanatory variables as factors. An unresolved problem is: what does R do when the explanatory factors are not defined as factors when it obtains a different value for the intercept but the correct value for the fitted val

Re: [R] Estimate of intercept in loglinear model

2011-11-07 Thread Mark Difford
Nov 08, 2011; 4:58am Rolf Turner wrote: >(in response to >>> Professor Colin Aitken, >>> Professor of Forensic Statistics, >!!!) > >> >> Do you suppose you could provide a data-corpse for us to dissect? >Fortune nomination!!! I think Sherlock would have said, "But it's elementary, my dea

Re: [R] Estimate of intercept in loglinear model

2011-11-07 Thread Rolf Turner
On 08/11/11 07:11, David Winsemius wrote: (in response to Professor Colin Aitken, Professor of Forensic Statistics, !!!) Do you suppose you could provide a data-corpse for us to dissect? Fortune nomination!!! cheers, Rolf Turner

Re: [R] Estimate of intercept in loglinear model

2011-11-07 Thread Mark Difford
On Nov 07, 2011 at 7:59pm Colin Aitken wrote: > How does R estimate the intercept term \alpha in a loglinear > model with Poisson model and log link for a contingency table of counts? Colin, If you fitted this using a GLM then the default in R is to use so-called treatment contrasts (i.e. Dunne

Re: [R] Estimate of intercept in loglinear model

2011-11-07 Thread Mark Difford
On Nov 07, 2011 at 9:04pm Mark Difford wrote: > So here the intercept represents the estimated counts... Perhaps I should have added (though surely unnecessary in your case) that exponentiation gives the predicted/estimated counts, viz 21 (compared to 18 for the saturated model). ## > exp(3.0445

Re: [R] Estimate of intercept in loglinear model

2011-11-07 Thread David Winsemius
On Nov 7, 2011, at 12:59 PM, Colin Aitken wrote: How does R estimate the intercept term \alpha in a loglinear model with Poisson model and log link for a contingency table of counts? (E.g., for a 2-by-2 table {n_{ij}) with \log(\mu) = \alpha + \beta_{i} + \gamma_{j}) I fitted such a mod

[R] Estimate of intercept in loglinear model

2011-11-07 Thread Colin Aitken
How does R estimate the intercept term \alpha in a loglinear model with Poisson model and log link for a contingency table of counts? (E.g., for a 2-by-2 table {n_{ij}) with \log(\mu) = \alpha + \beta_{i} + \gamma_{j}) I fitted such a model and checked the calculations by hand. I agreed wit