Wondered if anyone could help. I've fit the below model in R using GLS from the nlme package.

m2_p1q2 <- gls(log(ratio) ~ level + levellag + 
        trend + time, 
      method = "ML", correlation = corARMA(p = 1, q = 2, form = ~ time), 
      data = a1)

The plotted regression shows a curve and I wondered whether this might be viewed as a problem with fit?

enter image description here

Any advice appreciated....


Your data seem to exhibit heteroskedasticity (non-constant variance) and your model does not account for this through either explicitly modeling the variance or weighting of observations. That is a problem. I would consult your favorite statistics book on weighted least squares and variance-stabilizing transformations.

  • $\begingroup$ Thanks. The non-constant variance is a key component of the effect I am trying to measure. Would that represent and issue to weighted least squares? $\endgroup$
    – user284031
    Jul 24 '20 at 12:50
  • $\begingroup$ No, that is one of the common uses of weighted least squares -- to adjust for non-constant variance. $\endgroup$
    – kurtosis
    Jul 24 '20 at 16:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.