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

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

[复制链接]
发表于 2012-9-29 23:04:49 | 显示全部楼层 |阅读模式
simulateSNPcatResponse(scrime)
simulateSNPcatResponse()所属R语言包:scrime

                                        Simulation of SNP Data with Categorical Response
                                         分类响应的SNP数据与仿真

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

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

Simulates SNP data. Interactions of some of the simulated SNPs are then used to specify a categorical response by level-wise or multinomial logistic regression.
模拟SNP数据。一些模拟单核苷酸多态性的相互作用,用于指定一个明确的回应级明智或多项Logistic回归。


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


simulateSNPcatResponse(n.obs = 1000, n.snp = 50, list.ia = NULL,
   list.snp = NULL, withRef = FALSE, beta0 = -0.5, beta = 1.5,
   maf = 0.25, sample.y = TRUE, rand = NA)
  
## S3 method for class 'simSNPcatResponse'
print(x, justify = c("left", "right"), spaces = 2, ...)



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

参数:n.obs
number of observations that should be generated.
应生成的观测数。


参数:n.snp
number of SNPs that should be generated.
应生成的SNPs的数目。


参数:list.ia
a list consisting of n.cat objects, where n.cat is the number of levels the response should have. If one interaction of SNPs should be explanatory for a specific level of the response, then the corresponding object in list.ia must be a numeric vector specifying the genotypes of the interacting SNPs by the integers -3, -2, -1, 1, 2, or 3, where 1 codes for the homozygous reference genotype, 2 for the heterozygous genotype, and 3 for the homozygous variant genotype, and a minus before these numbers means that the corresponding SNP should be not of this genotype. If more than one interaction should be explanatory for a specific category, then the corresponding object of list.ia must be a list containing one numeric vector composed of the integers -3, -2, -1, 1, 2, and 3 for each of the interactions.
一个列表由n.cat对象,其中n.cat是多少级响应应该有。如果一个交互的SNP位点应该是说明一个特定的电平的响应,然后list.ia必须是数字矢量指定由整数-3,-2,-1的相互作用的单核苷酸多态性的基因型中的相应对象, 1,2,或3,其中1的纯合子的基因型,2为杂合基因型中,和3为纯合子的基因型中,之前,这些数字和负的代码意味着相应的SNP不应该是这个基因型。如果一个以上的相互作用应该解释为一个特定的类别,然后list.ia必须是一个列表,其中包含一个数值向量组成的整数-3,-2,-1,1,2,和3的相应的对象为每个的相互作用。

If, e.g., one of the vectors is given by c(1, -1, -3) and the corresponding vector in list.snp is c(5, 7, 8), then the corresponding interaction explanatory for a level of the response is given by
如果,例如,由下式给出一个向量c(1, -1, -3)中的相应向量list.snpc(5, 7, 8),然后说明的响应的电平相应的相互作用由

(SNP5 == 1) & (SNP7 != 1) & (SNP8 != 3).
(SNP5 == 1) & (SNP7 != 1) & (SNP8 != 3)。

For more details, see Details. Must be specified if list.snp is specified. If both list.ia and list.snp are NULL, then the interactions shown in the Details section are used.
有关详细信息,请参阅详细信息。必须规定,如果list.snp指定。如果这两个list.ia和list.snp是NULL,然后在“详细资料”节的相互作用。


参数:list.snp
a list consisting of numeric vectors (if one interaction should be explanatory for a level of the response) or lists of numeric vectors (if there should be more than one explanatory interaction) specifying the SNPs that compose the interactions. list.snp must have the same structure as list.ia, and each entry of list.snp must be an integer between 1 and n.snp. If list.ia is specified but not list.snp, then the first n SNPs are used to generate the interactions, where n is the total number of values in list.ia. For the case that both list.ia and list.snp are not specified, see Details.
数值向量(如果一个相互作用应该说明的响应的电平)或数值向量(如果有应该超过1说明交互)指定的SNPs组成的相互作用的列表组成的列表。 list.snp必须具有相同的结构,如list.ia,并且每个条目list.snp必须是1之间的整数和n.snp。如果list.ia的规定,但不是list.snp,然后第一个n单核苷酸多态性是用来产生相互作用,nlist.ia的总数值 。对于这两个list.ia和list.snp不指定,详细的情况。


参数:withRef
should there be an additional reference group (i.e.\ a control group) denoted by a  zero? If TRUE, a multinomial logistic regression is used to specify the class labels. If FALSE, level-wise logistic regressions are employed to generate the class labels. For details, see Details.
应该有一个额外的参考组(即\对照组)表示由零?如果TRUE,多项式Logistic回归用于指定类的标签。如果FALSE,水平明智的logistic回归分析,生成类的标签。有关详细信息,请参阅详细信息。


参数:beta0
a numeric value or vector of length(list.ia) specifying the intercept of the logistic regression models.
一个数值或向量length(list.ia)指定的logistic回归模型的截距。


参数:beta
either a non-negative numeric value or a list of non-negative numeric values specifying the parameters in the logistic regression models. If a numeric value, all parameters (except for the intercept) in all logistic regression models will be equal to this value. If a list, then this list must have the same length as list.ia, and each object must consist of as many numeric values as interactions are specified by the corresponding object in list.ia.
无论是一个非负的数值或的列表指定logistic回归模型中的参数的非负的数值。如果一个数值,在logistic回归模型中的所有参数(用于拦截除外)将等于该值。如果列表中,然后此列表必须具有相同的长度list.ia,每个对象都必须包括尽可能多的数值作为相互作用的所指定的相应的对象在list.ia。


参数:maf
either an integer, or a vector of length 2 or n.snp specifying the minor allele frequency. If an integer, all the SNPs will have the same minor allele frequency. If a vector of length n.snp, each SNP will have the minor allele frequency specified in the corresponding entry of maf. If length 2, then maf is interpreted as the range of the minor allele frequencies, and for each SNP, a minor allele frequency will be randomly drawn from a uniform distribution with the range given by maf.
一个整数,或向量的长度为2或n.snp指定次要等位基因频率。如果所有的SNP的整数,将具有相同的次要等位基因频率。如果一个向量的长度n.snp,每个SNP有轻微的等位基因频率在相应的条目,maf。如果长度为2,那么maf被解释为次要等位基因频率的范围,并为每个SNP,未成年人的等位基因频率从均匀分布的maf给定范围内随机抽取。


参数:sample.y
should the values of the response be randomly drawn using the probabilities determined by the logistic regression models? If FALSE, then for each of the n.obs observations, the value of the response is given by the level exhibiting the largest probability at this observation.
如果这两个值的响应被随机抽取使用的logistic回归模型确定的概率?如果FALSE,然后为每个n.obs观测的响应的值是给定的由电平表现出最大的概率在这个观察。


参数:rand
a numeric value for setting the random number generator in a reproducible state.
设置在一个再现状态的随机数发生器的一个数字值。


参数:x
the output of simulateSNPcatResponse
输出simulateSNPcatResponse:


参数:justify
a character string specifying whether the column of the summarizing table that names the explanatory interactions should be "left"- or "right"-adjusted.
一个字符串,用于指定是否汇总表列命名的解释作用应该是"left" - "right"调整。


参数:spaces
integer specifying the distance from the left end of the column mentioned in justify to the position at which the column name is presented.
整数,指定的距离从左端的列中提到justify列名的位置,在该位置。


参数:...
ignored.
忽略不计。


Details

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

simulateSNPcatResponse first simulates a matrix consisting of n.obs observations and n.snp SNPs, where the minor allele frequencies of these SNPs are given by maf.
simulateSNPcatResponse先n.obs的意见和n.snp个SNPs,这些SNPs的次要等位基因频率的maf。模拟矩阵组成,

Note that all SNPs are currently simulated independently of each other such that they are unlinked. Moreover, an observation is currently not allowed to have genotypes/interactions that are explanatory for more than one of the levels of the response. If, e.g., the response has three categories, then an observation can either exhibit one (or more) of the genotypes explaining the first level, or one (or more) of the genotypes explanatory for the second level, or one (or more) of the genotypes explaining the third level, or none of these genotypes.
请注意,所有的单核苷酸多态性是独立于彼此,使得它们是无关联的当前模拟。此外,观察目前不允许有基因型/相互作用,说明响应一个以上的水平。 ,例如,如果响应有三大类,然后观察可以表现出一个(或多个)说明的第一级的基因型,说明第二电平的基因型或一个(或多个),或一个(或多个)说明在第三级,或没有这些基因型的基因型。

Afterwards, the response is generated by employing the specifications of list.ia, list.snp, beta0 and beta.
之后,生成响应采用的规格list.ia,list.snp,beta0和beta。

By default, i.e.\ if both list.ia and list.snp are NULL, list.ia is set to
默认情况下,即\如果两个list.ia和list.snp是NULL,list.ia设置为

list(c(-1, 1), c(1, 1, 1), list(c(-1, 1), c(1, 1, 1))),
list(c(-1, 1), c(1, 1, 1), list(c(-1, 1), c(1, 1, 1))),

and list.snp is set to
和list.snp设置为

list(c(6, 7), c(3, 9, 10), list(c(2, 5), c(1, 4, 8)))
list(c(6, 7), c(3, 9, 10), list(c(2, 5), c(1, 4, 8)))

such that the interaction
这样的相互作用

(SNP6 != 1) & (SNP7 == 1)
(SNP6 != 1) & (SNP7 == 1)

is assumed to be explanatory for the first level of the three-categorical response, the interaction
被假定为说明的第一级的3分类响应,相互作用

(SNP3 == 1) & (SNP9 == 1) & (SNP10 == 1)
(SNP3 == 1) & (SNP9 == 1) & (SNP10 == 1)

is assumed to be explanatory for the second level, and the interactions
被假定为说明第二电平,和交互

(SNP2 != 1) & (SNP5 == 1)\ \ \ and
(SNP2 != 1) & (SNP5 == 1)\ \ \

(SNP1 == 1) & (SNP4 == 1) & (SNP8 == 1),
(SNP1 == 1) & (SNP4 == 1) & (SNP8 == 1),

are assumed to be explanatory for the third level.
被假定为说明第三级别。

If withRef = FALSE, then for each of the levels,  the probability of having this level given that an observation exhibits one, two, ... of the interactions intended to be explanatory for that level is determined using the corresponding logistic regression model. Afterwards, the value of the response for an observation showing one, two, ... of the interactions explanatory for a particular level is randomly drawn using the above probability p for the particular level and (1-p)/(n.cat - 1) as probabilities for the other (n.cat - 1) levels. If an observation exhibits none of the explanatory interactions, its response value is randomly drawn using the probabilities \exp{beta0}/(1+\exp{beta0}).
如果withRef = FALSE,然后为每个的水平,具有给定这个级别的概率,观察具有一个,两个,...的相互作用,旨在解释该级别的确定使用相应的logistic回归模型。之后,该值的响应的观察,示出一个,两个,...说明为某一特定水平的相互作用中随机抽取使用上述概率p的具体程度和(1-p)/(n.cat - 1)其他(n.cat - 1)水平的概率。如果观察显示没有解释相互作用,其响应值是随机抽取的使用的概率\exp{beta0}/(1+\exp{beta0})。

If withRef = TRUE, a multinomial logistic regression is used to specify the class labels. In this case the probabilities p.j, j = 1, ..., n.cat, are given by  p.j = exp(q.j) * p.0, where q.j are the probabilities on the logit-scale (i.e.\ the probabilities on the scale of the linear predictors) and  p.0^-1 = 1 + p.1 + ... + p.n.cat is the reciprocal of the probability for the control/reference group.  
如果withRef = TRUE,多项式Logistic回归用于指定类的标签。在这种情况下的概率p.j,j = 1, ..., n.cat,p.j = exp(q.j) * p.0,q.j是logit的规模的可能性(例如:\上规模的可能性线性预测)和p.0^-1 = 1 + p.1 + ... + p.n.cat是控制/参照组的概率的倒数。


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

An object of class simSNPcatResponse consisting of <table summary="R valueblock"> <tr valign="top"><td>x</td> <td> a matrix with n.obs rows and n.snp columns containing the simulated SNP values.</td></tr> <tr valign="top"><td>y</td> <td> a vector of length n.obs composed of the values of the response.</td></tr> <tr valign="top"><td>models</td> <td> a character vector naming the level-wise logistic regression models.</td></tr> <tr valign="top"><td>maf</td> <td> a vector of length n.snp composed of the minor allele frequencies.</td></tr> <tr valign="top"><td>tab.explain</td> <td> a data frame summarizing the results of the simulation.</td></tr> </table>
一个类的对象simSNPcatResponse组成的<table summary="R valueblock"> <tr valign="top"> <TD> x</ TD> <td>一个矩阵n.obs的行和n.snp列,其中包含模拟SNP值。</ TD> </ TR> <tr valign="top"> <TD>y </ TD> <td>一个向量的长度n.obs的值的响应组成。</ TD> </ TR> <tr valign="top"> <TD>models </ TD> <td>一个字符向量命名的水平聪明的logistic回归模型。</ TD> </ TR> <tr valign="top"> <TD>maf </ TD> <td>一个向量的长度n.snp组成的未成年人等位基因频率。</ TD> </ TR> <tr valign="top"> <TD>tab.explain </ TD> <td>一个数据框中的模拟的结果进行总结。</ TD> </ TR> </ TABLE>


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


Holger Schwender, <a href="mailto:holger.schwender@udo.edu">holger.schwender@udo.edu</a>



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

simulateSNPs, simulateSNPglm
simulateSNPs,simulateSNPglm


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


# The simulated data set described in Details.[模拟数据集的详细信息。]

sim1 <- simulateSNPcatResponse()
sim1

# Specifying the values of the response by the levels with[指定的值的响应由各级]
# the largest probability.[概率最大。]

sim2 <- simulateSNPcatResponse(sample.y = FALSE)
sim2

# If ((SNP4 != 2) &amp; (SNP3 == 1)), (SNP5 ==3), and[如果((SNP4!= 2)&(SNP3 == 1)),(SNP5 == 3),并]
# ((SNP12 !=1) &amp; (SNP9 == 3)) should be the three interactions[((SNP12!= 1)&(SNP9半套体== 3))应该是三种相互作用]
# (or variables) that are explanatory for the three levels[(或变量)是说明的三个级别]
# of the response, list.ia and list.snp are specified as follows.[的反应,list.ia和list.snp规定如下。]

list.ia <- list(c(-2, 1), 3, c(-1,3))
list.snp <- list(c(4, 3), 5, c(12,9))

# The categorical response and a data set consisting of [分类响应和数据组成的集合]
# 800 observations and 25 SNPs, where the minor allele[800观测和25个SNP位点,其中未成年人的等位基因]
# frequency of each SNP is randomly drawn from a[每个SNP的频率从随机抽取]
# uniform distribution with minimum 0.1 and maximum 0.4,[分布比较均匀,最低0.1,最高0.4,]
# is then generated by[然后,所产生的]

sim3 <- simulateSNPcatResponse(n.obs = 800, n.snp = 25,
  list.ia = list.ia, list.snp = list.snp, maf = c(0.1, 0.4))
sim3



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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-11-29 22:46 , Processed in 0.025420 second(s), 15 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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