data('MU284')
N=nrow(MU284)
Nh=table(MU284$REG)
Wh=Nh/N
L=length(unique(MU284$REG))
nh=rep(75,L)
st=strata(MU284[order(MU284$REG),],"REG",nh,"srswor")
错误内容:Error in strata(MU284[order(MU284$REG), ], "REG", nh, "srswor") :
all arguments must be the same length
在网上查了一下,错误原因在于参数必须长度一致。。。REG是MU284里面的一项变量,长度为284项。但是不知道为什么会出现这种错误。。。希望老师能给予解答QAQ.
N=nrow(MU284)
Nh=table(MU284$REG)
Wh=Nh/N
L=length(unique(MU284$REG))
nh=rep(75,L)
st=strata(MU284[order(MU284$REG),],"REG",nh,"srswor")
错误内容:Error in strata(MU284[order(MU284$REG), ], "REG", nh, "srswor") :
all arguments must be the same length
在网上查了一下,错误原因在于参数必须长度一致。。。REG是MU284里面的一项变量,长度为284项。但是不知道为什么会出现这种错误。。。希望老师能给予解答QAQ.
