“ gls函数使用广义最小二乘法拟合线性模型。允许误差相关和/或具有不相等的方差。”
示例
# NOT RUN {
# AR(1) errors within each Mare
fm1 <- gls(follicles ~ sin(2*pi*Time) + cos(2*pi*Time), Ovary,
correlation = corAR1(form = ~ 1 | Mare))
# variance increases as a power of the absolute fitted values
fm2 <- update(fm1, weights = varPower())
# }
我从https://www.rdocumentation.org/packages/nlme/versions/3.1-137/topics/gls
获得了以上所有信息在示例中,他们使用了非线性模型“卵泡〜sin(2 * pi * Time)+ cos(2 * pi * Time)”。 我的疑问是为什么他们使用gls fucntion拟合非线性模型?有什么想法!
提前谢谢