Hi,
	Sorry to bother everyone with what is probably another
misguided question so close to holidays, but in 

	Applying Generalized Linear Models, J.K. Lindsey

Lindsey talks about fitting various models to the gdp of the UK for
1948-1967.


> gdp
   Year  GDP
1  1948 1422
2  1949 1577
3  1950 1700
4  1951 1889
5  1952 2106
6  1953 2359
7  1954 2552
8  1955 2829
9  1956 3103
10 1957 3381
11 1958 3492
12 1959 3736
13 1960 4120
14 1961 4619
15 1962 4731
16 1963 4906
17 1964 5869
18 1965 6331
19 1966 6686
20 1967 7145


He fits several models, amonst which one is


	log(\mu_{GDP}) = log(\alpha) + \beta t

assuming normally distributed errors.  In R, 


  > summary(glm(GDP~I(Year-1947),family=gaussian(link="log"),data=gdp))

  Call:
  glm(formula = GDP ~ I(Year - 1947), family = gaussian(link = "log"), 
      data = gdp)

  Deviance Residuals: 
       Min        1Q    Median        3Q       Max  
  -337.431  -100.075    -3.082   106.679   180.593  

  Coefficients:
		 Estimate Std. Error t value Pr(>|t|)    
  (Intercept)    7.261463   0.025527   284.5   <2e-16 ***
  I(Year - 1947) 0.081454   0.001613    50.5   <2e-16 ***
  ---
  Signif. codes:  0  `***'  0.001  `**'  0.01  `*'  0.05  `.'  0.1  ` '  1 

  (Dispersion parameter for gaussian family taken to be 18400.75)

      Null deviance: 59828537  on 19  degrees of freedom
  Residual deviance:   331214  on 18  degrees of freedom
  AIC: 257.05

  Number of Fisher Scoring iterations: 3


seems to give same solution as in the book.  Lindsey also fits


	\mu_{log(GDP)} = log(\alpha) + \beta t

assuming errors are log normally distributed.  I tried to do this in R with


> summary(glm(log(GDP)~I(Year-1947),family=gaussian(),data=gdp))

Call:
glm(formula = log(GDP) ~ I(Year - 1947), family = gaussian(), 
    data = gdp)

Deviance Residuals: 
      Min         1Q     Median         3Q        Max  
-0.074453  -0.027929   0.004232   0.030142   0.057964  

Coefficients:
               Estimate Std. Error t value Pr(>|t|)    
(Intercept)    7.226789   0.017714  407.96   <2e-16 ***
I(Year - 1947) 0.084117   0.001479   56.88   <2e-16 ***
---
Signif. codes:  0  `***'  0.001  `**'  0.01  `*'  0.05  `.'  0.1  ` '  1 

(Dispersion parameter for gaussian family taken to be 0.001454167)

    Null deviance: 4.731540  on 19  degrees of freedom
Residual deviance: 0.026175  on 18  degrees of freedom
AIC: -70.016

Number of Fisher Scoring iterations: 2


But I get a very different AIC to Lindsey (he gets 254.3).  I've
played around a bit and have no idea how to get his solution.  Any
clues?

Thanks

Simon

-- 
*****************************************************************
*  Simon Wotherspoon                               _--_|\       *
*  Maths Dept, University of Tasmania             /  Aus \      *
*  Tasmania, Australia                            \_.--._/      *
*  spoon@hilbert.maths.utas.edu.au                      v       *
*****************************************************************

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._

