export.MARK(RMark)
export.MARK()所属R语言包:RMark
Export data and models for import in MARK
进口MARK出口数据和模型
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Creates a .Rinp, .inp and optionally renamed output files that can be imported into MARK to create a new MARK project with all the data and output files.
创建。RINP,inp和任意更名为输出文件可以导入到MARK的所有数据文件和输出文件创建一个新的MARK项目。
用法----------Usage----------
export.MARK(x, project.name, model = NULL,
replace = FALSE, chat = 1, title = "",
ind.covariates = "all")
参数----------Arguments----------
参数:x
processed data list used to build models
处理过的数据列表用于构建模型
参数:project.name
character string to be used for prefix of filenames and for MARK project name; do not use "." in the filename
个字符的字符串为前缀的文件名和MARK项目名称;不使用“,”在文件名
参数:model
either a single mark model or a marklist
无论是单一标记模型或marklist的
参数:replace
if TRUE it will replace any existing files
如果是TRUE,它将取代任何现有的文件
参数:chat
user-specified chat value if desired
用户指定的聊天值,如果需要的话
参数:title
MARK project title string
MARK项目名称字符串
参数:ind.covariates
vector of character strings specifying names of individual covariates or "all" to use all present
向量的字符串指定的个人的变量的名称或“all”使用所有在场的
Details
详细信息----------Details----------
If you use Nest model and NestAge covariate you should use the processed data list (model$data) from a model using NestAge in the formula because the necessary individual covariates are added to the processed data list. Also, use default of ind.covariates="all".
如果您使用的鸟巢模型和NestAge协的,你应该使用处理过的数据列表(模型元数据),从公式中的一个模型使用NestAge,因为所需的各种协变量添加到处理过的数据列表。此外,使用默认的ind.covariates =“所有”。
After running this function to export the data and models to the working directory, start program MARK and select the File/RMARK Import menu item. Navigate to the working directory and select the "project.name".Rinp file. MARK will take over and create the project files and will import any specified model output files.
运行此功能,导出的数据和模型的工作目录后,启动程序标记和选择的文件/ RMARK的导入菜单项。导航到工作目录和,选择“project.name”。RINP文件。 MARK将接管并创建项目文件并导入任何指定的模型输出文件。
DO NOT use a "project name" that is the same as a filename you use as input (*.inp) to RMark because this function will create a file "project name".inp and it would over-write your existing file and the format could change. If you try this, the code will return an error that the filename is invalid because the file already exists.
请勿使用“项目名称”,也就是使用文件名作为输入(*。INP)RMark,因为该函数将创建一个文件的“项目名称”相同。inp和将超过写您的现有文件的格式可以改变的。如果你尝试这样做,代码将返回一个错误,文件名是无效的,因为该文件已经存在。
值----------Value----------
None
无
(作者)----------Author(s)----------
Jeff Laake
参见----------See Also----------
export.chdata, export.model
export.chdata,export.model
实例----------Examples----------
data(mstrata)
run.mstrata=function()
{
#[]
# Process data[过程数据]
#[]
mstrata.processed=process.data(mstrata,model="Multistrata")
#[]
# Create default design data[创建默认的设计数据]
#[]
mstrata.ddl=make.design.data(mstrata.processed)
#[]
# Define range of models for S; note that the betas will differ from the output[定义范围型号为S;注意的beta将不同于输出]
# in MARK for the ~stratum = S(s) because the design matrix is defined using[MARK~阶层= S(S),因为设计矩阵定义]
# treatment contrasts for factors so the intercept is stratum A and the other[治疗对比的因素,因此拦截阶层和其他]
# two estimates represent the amount that survival for B abd C differ from A.[两个估计量生存的B ABDÇ不同A.]
# You can use force the approach used in MARK with the formula ~-1+stratum which[您可以使用武力MARK~(-1)+层的公式中使用的方法]
# creates 3 separate Betas - one for A,B and C.[创建3个独立的测试版 - 一个为A,B和C。]
#[]
S.stratum=list(formula=~stratum)
S.stratumxtime=list(formula=~stratum*time)
#[]
# Define range of models for p[定义范围内的车型为p]
#[]
p.stratum=list(formula=~stratum)
#[]
# Define range of models for Psi; what is denoted as s for Psi[psi的,还有的是为幽记为S模型的定义范围]
# in the Mark example for Psi is accomplished by -1+stratum:tostratum which[在psi的是通过-1 +层的标记示例:tostratum]
# nests tostratum within stratum. Likewise, to get s*t as noted in MARK you[巢tostratum内地层。同样,s * t的注意在标记你]
# want ~-1+stratum:tostratum:time with time nested in tostratum nested in[想~(-1)+阶层:tostratum:tostratum嵌套在嵌套随着时间的推移]
# stratum.[阶层。]
#[]
Psi.s=list(formula=~-1+stratum:tostratum)
Psi.sxtime=list(formula=~-1+stratum:tostratum:time)
#[]
# Create model list and run assortment of models[创建模型列表和运行各式各样的模型]
#[]
model.list=create.model.list("Multistrata")
#[]
# Add on specific models that are paired with fixed p's to remove confounding[加具体型号,搭配固定的p除去混杂]
#[]
p.stratumxtime=list(formula=~stratum*time)
p.stratumxtime.fixed=list(formula=~stratum*time,fixed=list(time=4,value=1))
model.list=rbind(model.list,c(S="S.stratumxtime",p="p.stratumxtime.fixed",
Psi="Psi.sxtime"))
model.list=rbind(model.list,c(S="S.stratum",p="p.stratumxtime",Psi="Psi.s"))
#[]
# Run the list of models[运行列表模型]
#[]
mstrata.results=mark.wrapper(model.list,data=mstrata.processed,ddl=mstrata.ddl)
#[]
# Export data and models for import to MARK[导出数据和模型进口MARK]
#[]
export.MARK(mstrata.processed,"mstrata",mstrata.results,replace=TRUE)
#[]
# Return model table and list of models[回归模型的表格和列表的车型]
#[]
return(mstrata.results)
}
mstrata.results=run.mstrata()
data(mallard)
Dot=mark(mallard,nocc=90,model="Nest",
model.parameters=list(S=list(formula=~1)))
mallard.proc=process.data(mallard,nocc=90,model="Nest")
export.MARK(mallard.proc,"mallard",Dot,replace=TRUE)
data(robust)
time.intervals=c(0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0)
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))
robust.proc=process.data(data = robust, model = "Robust",
time.intervals=time.intervals)
export.MARK(robust.proc,"robust", model.1,replace=TRUE)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|