includeTimeDummy(RSiena)
includeTimeDummy()所属R语言包:RSiena
Functions to include time dummy effects in a Siena model
锡耶纳模型中的职能,包括时间虚拟的影响
译者:生物统计家园网 机器人LoveR
描述----------Description----------
This function provides an interface to set the TimeDummy column on selected rows of a Siena effects object.
此功能提供了一个接口,中设置TimeDummy列锡耶纳的影响对象的选定行的。
用法----------Usage----------
includeTimeDummy(myeff, ..., timeDummy="all", name=myeff$name[1],
type="eval", interaction1="", interaction2="", include=TRUE,
character=FALSE)
参数----------Arguments----------
参数:myeff
a Siena effects object as created by getEffects
锡耶纳的影响对象创建的getEffects的
参数:...
short names to identify the effects which should be included or excluded.
短的名称来标识应包含或排除的效果。
参数:timeDummy
character string. Either "all" or the periods for which to create dummies, space delimited.
字符的字符串。 “所有”期间创建假人,以空格分隔。
参数:include
Boolean. default TRUE, but can be switched to FALSE to turn off an effect.
布尔值。缺省为TRUE,但也可以切换为FALSE,则关闭效果。
参数:name
Name of network for which effects are being included. Defaults to the first in the effects object.
网络名称的影响。默认的影响对象中的第一个。
参数:type
Type of effects to be included.
的特效类型。
参数:interaction1
Name of siena object where needed to completely identify the effects e.g. covariate name or behavior variable name.
的锡耶纳对象名称需要完全识别的影响,如协变量名或行为变量名。
参数:interaction2
Name of siena object where needed to completely identify the effects e.g. covariate name or behavior variable name.
的锡耶纳对象名称需要完全识别的影响,如协变量名或行为变量名。
参数:character
Boolean: are the effect names character strings or not
布尔效果名称的字符串或不
Details
详细信息----------Details----------
The arguments should identify the effects completely. The
的参数应该完全确定的影响。 “
值----------Value----------
An updated version of the input effects object, with the include columns for one or more rows updated. Details of the rows altered will be printed.
更新版本的输入效果的对象,包括一个或多个行更新的列。行更改的详细信息将被打印出来。
(作者)----------Author(s)----------
Josh Lospinoso
参考文献----------References----------
for general information on RSiena.
参见----------See Also----------
sienaTimeTest, getEffects,
sienaTimeTest,getEffects,
实例----------Examples----------
## Estimate a restricted model[#估计受限制的模型]
mymodel <- sienaModelCreate(fn=simstats0c, nsub=2, n3=100)
mynet1 <- sienaNet(array(c(s501, s502, s503), dim=c(50, 50, 3)))
mydata <- sienaDataCreate(mynet1)
myeff <- getEffects(mydata)
myeff <- includeEffects(myeff, transTrip, balance)
ans <- siena07(mymodel, data=mydata, effects=myeff, batch=TRUE)
## Conduct the score type test to assess whether heterogeneity is present.[#进行测试,以评估是否存在异质性的计分方式。]
tt <- sienaTimeTest(ans)
## Suppose that we wish to include two time dummies.[#假设我们希望包括两个假人。]
## Add them in the following way:[#通过以下方式:]
myeff <- includeTimeDummy(myeff, recip, balance, timeDummy="2")
ans2 <- siena07(mymodel, data=mydata, effects=myeff, batch=TRUE)
## Re-assess the time heterogeneity[#重新评估的时间异质性]
tt2 <- sienaTimeTest(ans2)
## And so on..[#..]
## A demonstration of RateX heterogeneity. Note that rate[#RateX异质性的示范。需要注意的是速度]
## interactions are not implemented in general, just for[#交互,总体执引号况,只是]
## Rate x cCovar.[#率X cCovar。]
## Not run: [#不运行:]
mymodel <- sienaModelCreate(fn=simstats0c, nsub=2, n3=100)
mynet1 <- sienaNet(array(c(s501, s502, s503), dim=c(50, 50, 3)))
myccov <- coCovar(s50a[,1])
mydata <- sienaDataCreate(mynet1, myccov)
myeff <- getEffects(mydata)
myeff <- includeEffects(myeff, transTrip, balance)
myeff <- includeTimeDummy(myeff, RateX, type="rate",
interaction1="myccov")
ans <- siena07(mymodel, data=mydata, effects=myeff, batch=TRUE)
## End(Not run)[#(不执行)]
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|