不等方差组的glm:是否存在此Stata代码的R等价物?
众所周知,当为组拟合回归模型时,组之间的不相等方差可能会造成麻烦。有没有办法用R来解释这一点 本演示中提出了Stata的解决方案(幻灯片9-17)。幻灯片14所示的实际代码如下:不等方差组的glm:是否存在此Stata代码的R等价物?,r,stata,glm,R,Stata,Glm,众所周知,当为组拟合回归模型时,组之间的不相等方差可能会造成麻烦。有没有办法用R来解释这一点 本演示中提出了Stata的解决方案(幻灯片9-17)。幻灯片14所示的实际代码如下: # where I might normally specify . xtmixed . . . || id: boy ageXboy girl ageXgirl, nocons cov(un) # instead I want . xtmixed . . . || id: boy ageXboy, nocons c
# where I might normally specify
. xtmixed . . . || id: boy ageXboy girl ageXgirl, nocons cov(un)
# instead I want
. xtmixed . . . || id: boy ageXboy, nocons cov(un) || id: girl ageXgirl, nocons cov(un)
R中是否有类似的解决方案 查看和/或。具体而言,您可能需要使用
lme
中的pdBlocked
语法:您可能需要查看Pinheiro和Bates 2000以供参考。感谢您的建议!