[英]R: Error in eval(predvars, data, env) : numeric 'envir' arg not of length one in intrinsic.pars() in multgee package
I have a data frame df
with the following data: 我有一个包含以下数据的数据框df
:
family_id_cass twin_order ls75cat
10026 1 2
10026 2 2
10071 1 3
10071 2 3
10132 1 1
10132 2 2
I would like to run intrinsic.pars()
, so what I am doing is the following: 我想运行intrinsic.pars()
,所以我正在做以下事情:
intrinsic.pars(df$ls75cat, df$family_id_cass, df$twin_order, rscale="ordinal")
but i get the following error: intrinsic.pars(df$ls75cat, df$family_id_cass, df$twin_order, rscale="ordinal")
但我得到以下错误:
Error in eval(predvars, data, env) : numeric 'envir' arg not of length one
What am I doing wrong? 我究竟做错了什么?
intrinsic.pars()
seems to be written with a very temperamental interface which effectively ignores most of the parameters. intrinsic.pars()
似乎是用一个非常气质的接口编写的,该接口实际上忽略了大多数参数。 (I suspect this was meant to be an internal function.) In any case, you have to provide a data.frame to the argument 'data', which includes variables y
, id
, and time
: (我怀疑这是一个内部函数。)无论如何,您都必须为参数'data'提供一个data.frame,其中包括变量y
, id
和time
:
df <- read.csv(text=
"family_id_cass,twin_order,ls75cat
10026,1,2
10026,2,2
10071,1,3
10071,2,3
10132,1,1
10132,2,2")
newData<-data.frame(y=df$ls75cat,
id=df$twin_order,
time=df$family_id_cass)
# either of these calls will do:
intrinsic.pars(y,newData,id,time,rscale="ordinal")
intrinsic.pars(data=newData,rscale="ordinal")
#> [1] -3.498327e-07 -1.143481e-10 -5.162827e+00
#> Warning message:
#> glm.fit: fitted rates numerically 0 occurred
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.