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

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

[复制链接]
发表于 2012-10-1 13:28:25 | 显示全部楼层 |阅读模式
unmarkedMultFrame(unmarked)
unmarkedMultFrame()所属R语言包:unmarked

                                        Create an unmarkedMultFrame or an unmarkedFrameGMM.
                                         创建一个unmarkedMultFrame或一个unmarkedFrameGMM的。

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

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

These functions construct unmarkedFrames for data
这些功能构建的数据unmarkedFrames


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


  unmarkedMultFrame(y, siteCovs, obsCovs, numPrimary, yearlySiteCovs)
  unmarkedFrameGMM(y, siteCovs, obsCovs, numPrimary, yearlySiteCovs, type,
    obsToY, piFun)
  unmarkedFrameGDS(y, siteCovs, numPrimary, yearlySiteCovs, dist.breaks,
    survey, unitsIn, tlength)



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

参数:y
A matrix of the observed data.
矩阵的观测数据。


参数:siteCovs
Data frame of covariates that vary at the site level.
在站点级别的不同的协变量的数据框。


参数:obsCovs
Data frame of covariates that vary within site-year-observation level.
网站年的观测水平变化的协变量的数据框。


参数:numPrimary
Number of primary time periods (seasons in the multiseason model).
的主要时间段(季节在multiseason模式)。


参数:yearlySiteCovs
Data frame containing covariates at the site-year level.
数据框包含协变量在该网站全年水平。


参数:type
Either "removal" or "double" for constant-interval removal sampling or double observer sampling. This should be not be specified for other types of survey designs.
无论是“清除”或“双”为恒定间隔除去采样或双观察员的采样。这不应该被指定为其他类型的调查设计。


参数:obsToY
A matrix specifying relationship between observation-level covariates and response matrix
观察的协变量和响应矩阵的矩阵之间的指定关系


参数:piFun
A function converting an MxJ matrix of detection probabilities into an MxJ matrix of multinomial cell probabilities.
MXJ的检测概率矩阵转换成MXJ多项单元概率矩阵的功能。


参数:dist.breaks
see unmarkedFrameDS
看到unmarkedFrameDS


参数:survey
see unmarkedFrameDS
看到unmarkedFrameDS


参数:unitsIn
see unmarkedFrameDS
看到unmarkedFrameDS


参数:tlength
see unmarkedFrameDS
看到unmarkedFrameDS


Details

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

unmarkedMultFrame objects are used by colext.
unmarkedMultFrame对象由colext。

unmarkedFrameGMM objects are used by gmultmix.
unmarkedFrameGMM对象由gmultmix。

unmarkedFrameGDS objects are used by gdistsamp.
unmarkedFrameGDS对象由gdistsamp。

For a study with M sites, T years, and a maximum of J observations per site-year, the data are shaped as follows. y is an M by TJ matrix, with each row corresponding to a site.  siteCovs is a data frame with M rows.  yearlySiteCovs is a data frame with MT rows which are in site-major, year-minor order.  obsCovs is a data frame with MTJ rows, which are ordered by site-year-observation, so that a column of obsCovs corresponds to as.vector(t(y)), element-by-element.  The number of years must be specified in numPrimary.
对于一个与M网站,T年,和一个最大的J观测每个站点年的研究中,数据被成形为如下。 y是M by TJ矩阵,每一行对应一个网站。 siteCovs M行是一个数据框。 yearlySiteCovs是MT行主要在现场,同比轻微为了一个数据框。 obsCovs是一个数据框MTJ行,这是按网站年的观察,因此,一列obsCovs对应于as.vector(t(y)),元素的元素。必须指定在numPrimary的年数。

If the data are in long format, the convenience function formatMult is useful for creating the unmarkedMultFrame.
如果数据是在长格式,方便的功能formatMult是有用的创建unmarkedMultFrame。

unmarkedFrameGMM and unmarkedFrameGDS are superclasses of unmarkedMultFrame containing information on the survey design used that resulted in multinomial outcomes. For unmarkedFrameGMM and constant-interval removal sampling, you can set type="removal" and ignore the arguments obsToY and piFun. Similarly, for double-observer sampling, setting type="double" will automatically create an appropiate obsToY matrix and piFuns. For all other situations, the type argument of unmarkedFrameGMM should be ignored and the obsToY and piFun arguments must be specified. piFun must be a function that converts an MxJ matrix of detection probabilities into an MxJ matrix of multinomial cell probabilities. obsToY is a matrix describing how the obsCovs relate to the observed counts y. For further discussion and examples see the help page for multinomPois and piFuns.
unmarkedFrameGMM和unmarkedFrameGDS超所使用的调查问卷设计unmarkedMultFrame包含的信息,导致多项成果。去除对于unmarkedFrameGMM和固定间隔采样,您可以设置=“清除”,并,忽略了的参数obsToY和piFun。同样,双观察员采样,设置类型=“双”,将自动创建一个适当的obsToY矩阵和piFuns。对于所有其他情况下,被忽略的类型参数的unmarkedFrameGMM的的obsToY和piFun参数必须指定。 piFun必须是一个功能,将MXJ的检测概率矩阵MXJ多项单元概率矩阵。 obsToY是一个矩阵,描述了如何的obsCovs与观测到的计数Ÿ。进一步的讨论和示例,请参阅帮助页面multinomPois和piFuns。

unmarkedFrameGMM and unmarkedFrameGDS objects can be created from an unmarkedMultFrame using the "as" conversion method. See examples.
可以使用“转换为”方法创建一个unmarkedMultFrame unmarkedFrameGMM和unmarkedFrameGDS对象。见的例子。


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

an unmarkedMultFrame or unmarkedFrameGMM object
的unmarkedMultFrame或unmarkedFrameGMM对象


注意----------Note----------

Data used with colext, gmultmix, and gdistsamp may be collected during a single year, so
使用colext,gmultmix,并gdistsamp的数据可能被收集在一个单一的一年,所以


参见----------See Also----------

formatMult
formatMult


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



n <- 50   # number of sites[一些网站]
T <- 4    # number of primary periods[主周期数]
J <- 3    # number of secondary periods[第二时期的数量]

site <- 1:50
years <- data.frame(matrix(rep(2010:2013, each=n), n, T))
years <- data.frame(lapply(years, as.factor))
occasions <- data.frame(matrix(rep(1J*T), each=n), n, J*T))

y <- matrix(0:1, n, J*T)

umf <- unmarkedMultFrame(y=y,
    siteCovs = data.frame(site=site),
    obsCovs=list(occasion=occasions),
    yearlySiteCovs=list(year=years),
    numPrimary=T)

umfGMM1 <- unmarkedFrameGMM(y=y,
    siteCovs = data.frame(site=site),
    obsCovs=list(occasion=occasions),
    yearlySiteCovs=data.frame(year=c(t(years))),
    # or: yearlySiteCovs=list(year=years),[或:yearlySiteCovs =名单(年),]
    numPrimary=T, type="removal")


# A user-defined piFun calculating removal probs when time intervals differ.[用户定义的piFun计算拆除的probs时的时间间隔不同。]
instRemPiFun <- function(p) {
        M <- nrow(p)
        J <- ncol(p)
        pi <- matrix(NA, M, J)
        p[,1] <- pi[,1] <- 1 - (1 - p[,1])^2
        p[,2] <- 1 - (1 - p[,2])^3
        p[,3] <- 1 - (1 - p[,3])^5
        for(i in 2:J) {
                pi[,i] <- pi[, i - 1]/p[, i - 1] * (1 - p[, i - 1]) * p[, i]
                }
        return(pi)
        }

# Associated obsToY matrix required by unmarkedFrameMPois[美联社obsToY矩阵所要求的unmarkedFrameMPois]
o2y <- diag(ncol(y))
o2y[upper.tri(o2y)] <- 1
o2y


umfGMM2 <- unmarkedFrameGMM(y=y,
    siteCovs = data.frame(site=site),
    obsCovs=list(occasion=occasions),
    yearlySiteCovs=data.frame(year=years),
    numPrimary=T, obsToY=o2y, piFun="instRemPiFun")

str(umfGMM2)




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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-11-28 13:46 , Processed in 0.022983 second(s), 15 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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