Is there a library dealing with correlation in the residuals of a glm?

I have

bin3alt <-glm(respalt~ t+sn+c5.vrm,data=dfalt,family="quasibinomial")
> bin3alt

Call:  glm(formula = respalt ~ t + sn + c5.vrm, family = "quasibinomial",      
data = dfalt)

Coefficients:
(Intercept)           t2           t3           t4           t5           t6    
      sn2          sn3       c5.vrm
   -3.35957      1.81455      0.96161     -0.37701     -2.32657     -3.75074    
  0.24266      0.39056      0.06673

Degrees of Freedom: 230 Total (i.e. Null);  222 Residual
Null Deviance:       107000
Residual Deviance: 2290            AIC: NA

dfalt$pears <- residuals(bin3alt,type="pearson")
arima(dfalt$pears[dfalt$t==4],order=c(1,0,0)))

Call:
arima(x = dfalt$pears[dfalt$t == 4], order = c(1, 0, 0))

Coefficients:
         ar1  intercept
      0.6333    -0.5091
s.e.  0.1257     1.0490

Not all levels of the t factor, show correlation, but some do. The factor is 
not a random effect it is month of ageing. Also, if I use the Cochrane Orcutt 
manually, should I use response or pearson residuals? I know of lme, but think 
it requires a random effect.

Stephen Bond


        [[alternative HTML version deleted]]

______________________________________________
R-help@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.

Reply via email to