我正在寻找一种快速的方法来提取lme测试摘要中生成的观察值(N)的数量,而不是复制和粘贴?我在网上找到了this,但是命令似乎不是内置的,texreg包也没有上传到这个站点。
n <- nobs(model) #extract number of observations非常感谢。
发布于 2012-10-05 02:31:50
library(nlme)
x <- 1:80
g <- sort(rep(c(1,2,3,4),20))
set.seed(1)
y <- 3*x+g*0.01+rnorm(80,sd=0.01)
plot(y~x)
fit <- lme(y~x,random=~1|g)
nobs(fit)
[1] 80 #works just fine
fit$dims$N
[1] 80 #alternativehttps://stackoverflow.com/questions/12733169
复制相似问题