找回密码
 注册
查看: 717|回复: 0

R语言 RMark包 make.time.factor()函数中文帮助文档(中英文对照)

[复制链接]
发表于 2012-9-26 23:43:42 | 显示全部楼层 |阅读模式
make.time.factor(RMark)
make.time.factor()所属R语言包:RMark

                                        Make time-varying dummy variables from time-varying factor variable
                                         不同的虚拟变量,从时间变化的因素变量

                                         译者:生物统计家园网 机器人LoveR

描述----------Description----------

Create a new dataframe with time-varying dummy variables from a time-varying factor variable.  The time-varying dummy variables are named appropriately to be used as a set of time dependent individual covariates in a parameter specification
创建一个新的数据框与随时间变化的虚拟变量随时间变化的因素变量。随时间变化的虚拟变量被用作一组的时间依赖个人协变量的参数规范中被命名为适当


用法----------Usage----------


  make.time.factor(x, var.name, times, intercept = NULL,
    delete = TRUE)



参数----------Arguments----------

参数:x
dataframe containing set of factor variables with names composed of var.name prefix and times suffix
数据框包含因子变量集名称组成var.name前缀和后缀倍的


参数:var.name
prefix for variable names
变量名的前缀


参数:times
numeric suffixes for variable names
数字后缀的变量名


参数:intercept
the value of the factor variable that will be used for the intercept
因子变量的值,将用于为截距


参数:delete
if TRUE, the origninal time-varying factor variables are removed from the returned dataframe
如果TRUE,origninal的随时间变化的因子变量从返回的数据框


Details

详细信息----------Details----------

An example of the var.name and times is var.name="observer", times=1:5. The code expects to find observer1,...,observer5 to be factor variables in x. If there are k unique levels (excluding ".") across the time varying factor variables, then k-1 dummy variables are created for each of the named factor variables.  They are named with var.name, level[i], times[j] concatenated together where level[i] is the name of the facto level i. If there a m times then the new data set will contain m*(k-1) dummy variables. If the factor variable includes any "." values these are ignored because they are used to indicate a missing value that is paired with a missing value in the encounter history. Note that it will create each dummy variable for each factor even if a particular level is not contained within a factor (eg observers 1 to 3 used but only 1 and 2 on occasion 1).
的var.name和时间的一个例子是var.name =“观察者”,倍= 1:5。的代码,希望找到observer1,...,observer5的是在x因子变量。如果有k个独特的水平(不包括“。”)横跨随时间变化的因子变量,则k-1虚拟变量命名为每个因子变量创建。它们被命名为与var.name,水平[I],时间[J]连接在一起水平[I]的实际水平,我的名字是。如果有新的数据集时次,然后将含有米*第(k-1)个虚拟变量。如果该系数变量包括任何“。”值,这些都将被忽略,因为它们被用来指示丢失的值,该值是成对具有缺失值在遭遇历史。需要注意的是即使不包含在某一特定水平的一个因素,它会创建每个因素的每个虚拟变量(例如观察员1至3使用,但只有1和2的场合1)。


值----------Value----------

x: a dataframe containing the original data (with time-varying factor variables removed if delete=TRUE) and the time-varying dummy variables added.
X:一个数据框包含原始数据(删除,如果删除添加= TRUE)和随时间变化的虚拟变量随时间变化的因子变量。


(作者)----------Author(s)----------



Jeff Laake




实例----------Examples----------


# see example in weta[例如,在沙螽]

转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。


注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

手机版|小黑屋|生物统计家园 网站价格

GMT+8, 2025-4-19 17:27 , Processed in 0.022966 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表