add.design.data(RMark)
add.design.data()所属R语言包:RMark
Add design data
设计数据
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Creates new design data fields in (ddl) that bin the fields cohort, age or time. Other fields (e.g., effort value for time) can be added to ddl with R commands.
创建新的设计数据字段中(ddl)斌领域cohort,age或time。其他字段(例如,努力值时间)可以被添加到ddl与R命令。
用法----------Usage----------
add.design.data(data, ddl, parameter, type = "age",
bins = NULL, name = NULL, replace = FALSE,
right = TRUE)
参数----------Arguments----------
参数:data
processed data list resulting from process.data
处理过的数据列表process.data
参数:ddl
current design dataframe initially created with make.design.data
目前的设计数据框最初创建make.design.data的
参数:parameter
name of model parameter (e.g., "Phi" for CJS models)
模型参数的名称(例如,“披”CJS模型)
参数:type
either "age", "time" or "cohort"
无论是“年龄”,“时间”或“队列”
参数:bins
bins for grouping
箱分组
参数:name
name assigned to variable in design data
命名分配给变量的设计数据
参数:replace
if TRUE, replace any variable with same name as name
如果为TRUE,则更换任何变量具有相同的名称为name
参数:right
If TRUE, bin intervals are closed on the right
如果是TRUE,垃圾桶间隔禁区右侧
Details
详细信息----------Details----------
Design data can be added to the parameter specific design dataframes with R commands. Often the additional fields will be functions of cohort, age or time. add.design.data provides an easy way to add fields that bin (put into intervals) the original values of cohort, age or time. For example, age may have levels from 0 to 10 which means the formula ~age will have 11 parameters, one for each level of the factor. It might be more desirable and more parimonious to have a simpler 2 age class model of young and adults. This can be done easily by adding a new design data field that bins age into 2 intervals (age 0 and 1+) as in the following example:
设计数据可以被添加到与R命令的参数的具体设计dataframes。通常情况下,额外的领域将是cohort,age或time的功能。 add.design.data提供了一个简单的方法来添加字段,本(投入的时间间隔)的原始值cohort,age或time。例如,age可具有从0到10,这意味着式~age将有11个参数,为每个级别的因素中的一个水平。这可能是更可取的,更parimonious的有一个简单的2岁的年轻人和成年人类模型。这可以很容易地通过添加新的设计数据字段箱age成2的时间间隔(年龄0和1 +),如在下面的示例中:
值----------Value----------
Design data list with new field added for the specified parameter. See make.design.data for a description of the list structure.
指定的参数设计数据列表中添加新的领域。请参阅make.design.data为列表结构描述。
注意----------Note----------
For the specific case of "closed" capture models, the parameters p (capture probability) and c (recapture probability) can be treated in a special fashion. Because they really the same type of parameter, it is useful to be able to share a common model structure (i.e., same columns in the design matrix). This is indicated with the share=TRUE element in the model description for p. If the parameters are shared then the additional covariate c is added to the design data, which is c=0 for parameter p and c=1 for parameter c. This enables an additive model to be developed where recapture probabilities mimic the pattern in capture probabilities except for an additive constant. The covariate c can only be used in the model for p if share=TRUE. If the latter is not set using c in a formula will result in an error. Likewise, if share=TRUE, then the design data for p and c must be the same because the design data are merged in constructing the design matrix. Thus if you add design data for parameter p, you should add a similar field for parameter c if you intend to fit shared models for the two parameters. If the design data do not match and you try to fit a shared model, an error will result.
对于“闭合”捕获模型的具体情况下,参数p(捕获概率)和c(夺回概率)可以被视为一种特殊的方式。因为他们真的是同一类型的参数,它是有用的,能够共享一个共同的模型结构(即相同的设计矩阵中的列)。这表示share=TRUE模型中的元素描述p。如果参数是共享的,那么额外的协c的设计数据,这是c=0的参数p和c=1的参数c。此使添加剂模型,夺回概率模仿发展模式中捕获概率,但添加剂常数。的协c只能用于模型中的p如果share=TRUE。如果是后者没有使用c的公式将导致一个错误。同样,如果share=TRUE,然后p和c必须是相同的,因为设计数据合并在建设的设计矩阵的设计数据。因此,如果你添加设计数据参数p,你应该添加一个类似的字段的参数c,如果你打算以适应共享模型的两个参数。如果设计数据不匹配,你尝试将共享模型,将产生一个错误。
(作者)----------Author(s)----------
Jeff Laake
参见----------See Also----------
make.design.data, process.data
make.design.data,process.data
实例----------Examples----------
data(example.data)
example.data.proc=process.data(example.data)
ddl=make.design.data(example.data.proc)
ddl=add.design.data(example.data.proc,ddl,parameter="Phi",type="age",
bins=c(0,.5,10),name="2ages")
ddl=add.design.data(example.data.proc,ddl,parameter="p",type="age",
bins=c(0,.5,10),name="2ages")
ddl=add.design.data(example.data.proc,ddl,parameter="Phi",type="age",
bins=c(0,1,10),name="2ages",replace=TRUE)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|