Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/r/71.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
不等方差组的glm:是否存在此Stata代码的R等价物?_R_Stata_Glm - Fatal编程技术网

不等方差组的glm:是否存在此Stata代码的R等价物?

不等方差组的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

众所周知,当为组拟合回归模型时,组之间的不相等方差可能会造成麻烦。有没有办法用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 cov(un) || id: girl ageXgirl, nocons cov(un) 

R中是否有类似的解决方案

查看和/或。具体而言,您可能需要使用
lme
中的
pdBlocked
语法:您可能需要查看Pinheiro和Bates 2000以供参考。感谢您的建议!