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

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

[复制链接]
发表于 2012-10-1 11:45:34 | 显示全部楼层 |阅读模式
trapezoid(trapezoid)
trapezoid()所属R语言包:trapezoid

                                        The Trapezoidal Distribution
                                         梯形分布

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

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

Density function, distribution function, quantile function, and random generation for the trapezoidal distribution with minimum equal to min, lower mode equal to mode1, upper mode equal  to mode2, and maximum  equal to max. For the generalized trapezoidal distribution, n1, n3, and alpha may optionally be specified.
密度函数,分布函数,分位数函数,等于min,低模式等于mode1,上模等于mode2,“以最小的为梯形分布的随机生成,最大等于max。对广义的梯形分布,n1,n3和alpha可以选择指定。


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


        dtrapezoid(x, min = 0, mode1 = 1/3, mode2 = 2/3, max = 1, n1 = 2, n3 = 2,
                alpha = 1, log = FALSE)
        ptrapezoid(q, min = 0, mode1 = 1/3, mode2 = 2/3, max = 1, n1 = 2, n3 = 2,
                alpha = 1, lower.tail = TRUE, log.p = FALSE)
        qtrapezoid(p, min = 0, mode1 = 1/3, mode2 = 2/3, max = 1, n1 = 2, n3 = 2,
                alpha = 1, lower.tail = TRUE, log.p = FALSE)
        rtrapezoid(n, min = 0, mode1 = 1/3, mode2 = 2/3, max = 1, n1 = 2, n3 = 2,
                alpha = 1)



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

参数:x,q
vector of quantiles.
向量的位数。


参数:p
vector of probabilities.
向量的概率。


参数:n
number of observations. If length(n) > 1, the length is taken to be the number required.
若干意见。如果长度(n)>1,其长度是所需的数量。


参数:min
vector of minima.
向量极小。


参数:mode1
vector of lower modes.
矢量较低的模式。


参数:mode2
vector of upper modes.
向量上的模式。


参数:max
vector of maxima.
向量的最大值。


参数:n1
vector of growth parameters.
向量的生长参数。


参数:n3
vector of decay parameters.
矢量的衰减参数。


参数:alpha
vector of boundary ratio parameters.
矢量的边界比参数。


参数:log, log.p
logical; if TRUE, probabilities p are given as log(p).
逻辑,如果TRUE,概率plog(p)。


参数:lower.tail
logical; if TRUE (default), probabilities are P[X <= x], otherwise, P[X > x].
逻辑;如果TRUE(默认),概率是P[X <= x],否则,“P[X > x]。


Details

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

The generalized trapezoidal distribution is described by van Dorp and Kotz (2003) and van Dorp and colleagues (2007).  With n1, n3, and alpha equal to the default values of  2, 2, and 1, respectively, the distribution shape is of a quadrilateral trapezoid. Altering n1, n3, or alpha changes the growth rate, decay rate, and boundary ratio parameters, respectively, as demonstrated in the examples below.
面包车的Dorp和科茨(2003年)和面包车的Dorp和他的同事(2007)所描述的广义梯形分布。随着n1,n3,和alpha等于默认值2,2,和1,分别,分布的形状是四边形的梯形。改变n1,n3或alpha的增长速度,衰减率和边界比参数,分别在下面的例子中,作为改变。


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

dtrapezoid gives the density function, ptrapezoid gives the distribution function, qtrapezoid gives the quantile function, and rtrapezoid generates random deviates.
dtrapezoid给出了密度函数,ptrapezoid给出了分布函数,qtrapezoid给出了分位数的功能,和rtrapezoid随机产生的偏离。


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


Jeremy Thoms Hetzel <a href="mailto:jthetzel@gmail.com">jthetzel@gmail.com</a>



参考文献----------References----------

Generalized trapezoidal distributions. Metrika. 58(1):85&ndash;97. Preprint available: http://www.seas.gwu.edu/~dorpjr/Publications/JournalPapers/Metrika2003VanDorp.pdf
An elicitation procedure for the generalized trapezoidal distribution with a uniform central stage. Decision Analysis Journal. 4:156&ndash;166. Preprint available: http://www.seas.gwu.edu/~dorpjr/Publications/JournalPapers/DA2007.pdf

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

Distributions for standard distributions.
分布的标准分布。


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


        ## Plot default trapezoid distribution[图默认梯形分布]
        curve(dtrapezoid(x, min=0, mode1=1/3, mode2=2/3, max=1, n1=2, n3=2, alpha=1),
                from=0, to=1)
       
       
        ## Plot triangular trapezoid distribution[#绘制三角形梯形分布]
        curve(dtrapezoid(x, min=0, mode1=1/2, mode2=1/2, max=1, n1=2, n3=2, alpha=1),
                from=0, to=1)
       
       
        ## Explore effects of n1, n3, and alpha parameters[#游遍影响,N1,N3,和α参数]
        # plyr and ggplot2 are required for this example[在这个例子中需要plyr和ggplot2]
        require(plyr)
        require(ggplot2)
       
        x <- seq(from = 0, to = 1, by = 0.01)       
       
        # Create a lists of arguments, varying n1, n3, and alpha[创建一个列表的参数,改变N1,N3,和α]
        arguments <- list()
        arguments[['A']] <- list(x = x, n1 = 2, n3 = 2, alpha = 0.8)
        arguments[['B']] <- list(x = x, n1 = 1.5, n3 = 1.5, alpha = 1)
        arguments[['C']] <- list(x = x, n1 = 2.5, n3 = 2.5, alpha = 1.5)
        arguments[['D']] <- list(x = x, n1 = 1.5, n3 = 2.5, alpha = 0.5)
        arguments[['E']] <- list(x = x, n1 = 2.5, n3 = 1.5, alpha = 1)
        arguments[['F']] <- list(x = x, n1 = 0.5, n3 = 0.5, alpha = 1.5)
        arguments[['G']] <- list(x = x, n1 = 1.5, n3 = 0.5, alpha = 0.5)
        arguments[['H']] <- list(x = x, n1 = 2.5, n3 = 0.5, alpha = 1)
        arguments[['I']] <- list(x = x, n1 = 0.5, n3 = 1.5, alpha = 1.5)
        arguments[['J']] <- list(x = x, n1 = 0.5, n3 = 2.5, alpha = 0.5)
       
        # Calculate the distributions[计算分布]
        plot.data <- ldply(arguments, function(z)
                {
                        x <- z$x
                        density <- dtrapezoid(x = z$x, min = 0, mode1 = 0.2, mode2 = 0.8,
                                max = 1, n1 = z$n1, n3 = z$n3, alpha = z$alpha)
                        args <- paste("n1 = ", z$n1, ", n3 = ", z$n3, ", alpha = ", z$alpha,
                                sep="", collapse="")
                        out <- data.frame(x, density, args)
                })
       
        # Create labels for later use in displaying the arguments on the plots [创建标签显示参数的图,以备后用]
        plot.data$label <- paste(plot.data$.id, ": ", plot.data$args, sep="")
       
        # Create plots[创建图]
        generalizedTrapezoids <- ggplot(data = plot.data, aes(x = x, y = density)) +
                geom_line() + theme_bw() +
                facet_wrap(~label, ncol = 2, scales = "free_y")
        print(generalizedTrapezoids)

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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-12-2 03:57 , Processed in 0.022946 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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