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

R语言 RMark包 robust()函数中文帮助文档(中英文对照)

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

                                        Robust design example data
                                         坚固耐用的设计示例数据

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

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

A robust design example data set that accompanies MARK as an example analysis using the various models for the robust design.
一个强大的设计示例数据集,伴随着MARK为例进行分析,使用各种模型的稳健设计。


格式----------Format----------

A data frame with 668 observations on the following 2 variables.
668以下两个变量的观察与数据框。




ch a character vector containing the encounter history
CH字符向量的邂逅历史




freq the number of critters with that capture history
频率的怪物,捕捉历史


Details

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

This is a data set that accompanies program MARK as an example for robust models. The data are entered with the summary format using the variable freq which represents the number of critters with that capture (encounter) history.  The data set represents a robust design with 5 primary occasions and within each primary occasion the number of secondary occasions is 2,2,4,5,2 respectively.  This is represented with the time.intervals argument of process.data which are 0,1,0,1,0,0,0,1,0,0,0,0,1,0. The 0 time intervals represent the secondary sessions in which the population is assumed to be closed. The non-zero values are the time intervals between the primary occasions.  They are all 1 in this example but they can have different non-zero values.  The code determines the structure of the robust design based on the time intervals. The intervals must begin and end with at least one 0 and there must be at least one 0 between any 2 non-zero elements. The number of occasions in a secondary session is one plus the number of contiguous zeros.
这是一个数据集,伴随着计划MARK可靠的模型的一个例子。使用的摘要格式的数据输入变量freq的怪物的数量与捕捉(遭遇)的历史。该数据集是一个强大的设计与5个主要的场合,在每一个主要的场合二次场合的数量分别是2,2,4,5,2。这表示与time.intervalsprocess.data这是0,1,0,1,0,0,0,1,0,0,0,0,1,0参数。为0的时间间隔表示假定以封闭在人口二级会话。非零值之间的时间间隔的主要场合。他们都是1在这个例子中,但它们可以有不同的非零值。该代码确定的时间间隔的基础上设计的强大的结构。间隔必须至少有一个0开始和结束,并且必须有至少一0之间的任何非零元素。在第二届会议的次数是一加连续的零数。


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



data(robust)
run.robust=function()
{
#[]
# data from Robust.dbf with MARK[数据从Robust.dbf与MARK]
# 5 primary sessions with secondary sessions of length 2,2,4,5,2[小学5届二次会议的长度为2,2,4,5,2]
#[]
time.intervals=c(0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0)
#[]
# Random emigration, p=c varies by time and session, S by time[随机移民,不同的时间和会话P = C,S的时间]
#[]
S.time=list(formula=~time)
p.time.session=list(formula=~-1+session:time,share=TRUE)
GammaDoublePrime.random=list(formula=~time,share=TRUE)
model.1=mark(data = robust, model = "Robust",
            time.intervals=time.intervals,
            model.parameters=list(S=S.time,
            GammaDoublePrime=GammaDoublePrime.random,p=p.time.session),threads=2)
#[]
# Random emigration, p varies by session, uses Mh but pi fixed to 1,[随机移民,对不同的会话,使用氢,但圆周率固定为1,]
# S by time.This model is in the example Robust with MARK but it is[S的时令模型是强劲,MARK的例子,但它是]
# a silly example because it uses the heterogeneity model but then fixes[一个愚蠢的例子,因为它使用的异质性模型,然后修复]
# pi=1 which means there is no heterogeneity.Probably the data were[PI = 1,这意味着有没有heterogeneity.Probably数据]
# not generated under Mh.  See results of model.2.b[下不会产生氢。结果见的model.2.b的]
#[]
pi.fixed=list(formula=~1,fixed=1)
p.session=list(formula=~-1+session,share=TRUE)
model.2.a=mark(data = robust, model = "RDHet",
            time.intervals=time.intervals,
            model.parameters=list(S=S.time,
            GammaDoublePrime=GammaDoublePrime.random,
            p=p.session,pi=pi.fixed),threads=2)
#[]
# Random emigration, p varies by session, uses Mh and in this[随机移民,对不同的会话,使用氢和]
# case pi varies and so does p across[情况下圆周率各不相同,所以P值是否跨越]
# mixtures with an additive session effect.[添加剂会话效果的混合物。]
#[]
pi.dot=list(formula=~1)
p.session.mixture=list(formula=~session+mixture,share=TRUE)
model.2.b=mark(data = robust, model = "RDHet",
            time.intervals=time.intervals,
            model.parameters=list(S=S.time,
            GammaDoublePrime=GammaDoublePrime.random,
            p=p.session.mixture,pi=pi.dot),threads=2)
#[]
# Markov constant emigration rates, pi varies by session,[马氏恒定的移民率,PI不同的会议,]
# p=c varies by session, S constant[P = C因会话而异,S不变]
# This model is in the example Robust with MARK[这种模式的例子是在稳健与MARK]
# but it is a silly example because it[但它是一个愚蠢的例子,因为它]
# uses the heterogeneity model but then fixes pi=1[使用非均质模型,然后修复PI = 1]
# which means there is no heterogeneity.[这意味着有没有异质性。]
# Probably the data were not generated under Mh.[大概的数据并没有下产生的氢。]
# See results of model.3.b[结果见的model.3.b的]
#[]
S.dot=list(formula=~1)
pi.session=list(formula=~session)
p.session=list(formula=~-1+session,share=TRUE)
GammaDoublePrime.dot=list(formula=~1)
GammaPrime.dot=list(formula=~1)
model.3.a=mark(data = robust, model = "RDHet",
            time.intervals=time.intervals,
            model.parameters=list(S=S.dot,
            GammaPrime=GammaPrime.dot,
            GammaDoublePrime=GammaDoublePrime.dot,
            p=p.session,pi=pi.session),threads=2)
#[]
# Markov constant emigration rates, pi varies by session,[马氏恒定的移民率,PI不同的会议,]
# p=c varies by session+mixture, S constant. This is model.3.a[P = C不同的会话+混合物,S不变。这是model.3.a]
# but allows pi into the model by varying p/c by mixture.[但允许丕到模型中,通过改变P / C的混合物。]
#[]
S.dot=list(formula=~1)
pi.session=list(formula=~session)
GammaDoublePrime.dot=list(formula=~1)
GammaPrime.dot=list(formula=~1)
model.3.b=mark(data = robust, model = "RDHet",
            time.intervals=time.intervals,
            model.parameters=list(S=S.dot,
            GammaPrime=GammaPrime.dot,
            GammaDoublePrime=GammaDoublePrime.dot,
            p=p.session.mixture,pi=pi.session),threads=2)
#[]
# Huggins Random emigration, p=c varies by time and session,[哈金斯随机移民,P = C不同的时间和会话,]
# S by time[S的时间]
# Beware that this model is not quite the same[要注意的是这种模式是不太一样的]
# as the others above that say random emigration because[以上的人,说随机的移民,因为]
# the rates have been fixed for the last 2 occasions.[已修复率在过去的2的场合。]
# That was done with PIMS in the MARK example and[这是PIMS在MARK的例子,]
# here it is done by binning the times so that times 3 and 4[在这里,它是通过分级的时代,所以次,3和4]
# are in the same bin, so the time model[在同一bin,所以时间模型]
# has 3 levels (1,2, and 3-4).  By doing so the parameters[有3个级别(1,2,和3-4)。通过这样做的参数]
# become identifiable but this may not be[成为可识别的,但是这可能不是]
# reasonable depending on the particulars of the data.[合理的数据的详情。]
# Note that the same time binning must be done both for[需要注意的是在相同的时间离散化必须做既为]
# GammaPrime and GammaDoublePrime because the parameters are[GammaPrime和GammaDoublePrime,因为这些参数是]
# the same in the random emigration model.  If you[在随机的移民模式相同。如果您]
# forget to bin one of the parameters across time it will fit[忘记斌的参数之一,适合跨越时间]
# a model but it won't be what you expect as it will[一个模型,但它不会是你所期望的,因为它会]
# not share parameters.  Note the use of the argument "right".[不共享参数。请注意,使用“正确”的说法。]
# This controls whether binning is inclusive on the right (right=TRUE)[控制是否分级是包容性的权利(右= TRUE)]
# or on the left (right=FALSE).  Using "right" nested in the list[或在左边(右= FALSE)。使用“正确”的嵌套列表中的]
# of design parameters is equivalent to using it as a calling[的设计参数是相当于使用它作为一个呼叫]
# argument to make.design.data or add.design.data.[参数,make.design.data或add.design.data。]
#[]
S.time=list(formula=~time)
p.time.session=list(formula=~-1+session:time,share=TRUE)
GammaDoublePrime.random=list(formula=~time,share=TRUE)
model.4=mark(data = robust, model = "RDHuggins",
        time.intervals=time.intervals,design.parameters=
        list(GammaDoublePrime=list(time.bins=c(1,2,5))),
        right=FALSE, model.parameters=
        list(S=S.time,GammaDoublePrime=GammaDoublePrime.random,
        p=p.time.session),threads=2)

return(collect.models())
}
robust.results=run.robust()
#[]
#  You will receive a warning message that the model list[您将收到一条警告消息,该模型列表]
#  includes models of different types which are not compatible[包括不同类型的模型,这是不兼容的]
#  for comparisons of AIC.  That is because[AIC的比较。这是因为]
#  the runs include closed models which include N[包括关闭运行模式包括N]
#  in the likelihood and Huggins models which don't include[的可能性和Huggins模型,其中不包括]
#  N in the likelihood.  That can be avoided by running[N合的可能性。即,可避免通过运行]
#  the two types of models in different sets.[在不同的集合(set)的两种类型的模型。]
#[]
robust.results


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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-11-23 23:14 , Processed in 0.024731 second(s), 15 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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