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

R语言 schwartz97包 distribution-state()函数中文帮助文档(中英文对照)

[复制链接]
发表于 2012-9-29 22:53:01 | 显示全部楼层 |阅读模式
distribution-state(schwartz97)
distribution-state()所属R语言包:schwartz97

                                        Schwartz two-factor Model: Distribution of the State Variables
                                         施瓦茨双因素模型:状态变量的分布

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

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

Density, distribution function and quantile function of the state variables. The state variables are the commodity spot price s and the spot convenience yield delta. The commodity log spot price and the convenience yield follow a bivariate normal distribution.
密度,分布函数和分位数的状态变量的函数。状态变量的大宗商品现货价格s和当场便利收益delta。商品log现货价格和便利收益的二元正态分布。


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



## S4 method for signature 'ANY,ANY,numeric'
dstate(x, time = 1, s0 = 50, delta0 = 0,
       mu = 0.1, sigmaS = 0.3, kappa = 1, alpha = 0,
       sigmaE = 0.5, rho = 0.75, ...)

## S4 method for signature 'ANY,ANY,schwartz2f'
dstate(x, time = 1, s0, ...)


## S4 method for signature 'ANY,ANY,ANY,numeric'
pstate(lower, upper, time = 1, s0 = 50, delta0 = 0,
       mu = 0.1, sigmaS = 0.3, kappa = 1, alpha = 0,
       sigmaE = 0.5, rho = 0.75, ...)

## S4 method for signature 'ANY,ANY,ANY,schwartz2f'
pstate(lower, upper, time = 1, s0, ...)

## S4 method for signature 'ANY,ANY,numeric'
qstate(p, time = 1, s0 = 50, delta0 = 0,
       mu = 0.1, sigmaS = 0.3, kappa = 1, alpha = 0,
       sigmaE = 0.5, rho = 0.75, tail = "lower.tail", ...)

## S4 method for signature 'ANY,ANY,schwartz2f'
qstate(p, time = 1, s0, tail = "lower.tail", ...)




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

参数:x
Vector or matrix of quantiles. If x is a matrix, each row is taken to be a quantile.
矢量或矩阵位数。如果x是一个矩阵,每一行是一个位数。


参数:time
Time at which the quantity is computed (relative to time zero).  
时的时间的数量计算的(相对时间为零)。


参数:p
Probability, a scalar.
概率,一个标量。


参数:lower
The vector of lower limits of length 2. Note that first component stands for lower limit of the commodity spot price rather than the log-price.
的矢量的长度为2的下限。请注意,第一组分代表商品现货价的下限,而不是记录价格。


参数:upper
The vector of upper limits of length 2. Note that first component stands for the upper limit of the commodity spot price rather than the log-price.
的矢量的长度为2的上限。请注意,第一组分代表商品现货价的上限,而不是记录价格。


参数:s0
Either a numeric representing the initial value of the commodity spot price or an object inheriting from class schwartz2f.
一个numeric代表的大宗商品现货价格的初始值或对象继承类schwartz2f。


参数:delta0
Initial value of the convenience yield.
便利收益的初始值。


参数:mu
enters the drift of the commodity spot price.
进入漂移的大宗商品现货价格。


参数:sigmaS
Diffusion parameter of the spot price-process.
现货价格过程的扩散参数。


参数:kappa
Speed of mean-reversion of the convenience yield process.
均值回归的便利收益过程的速度。


参数:alpha
Mean-level of the convenience yield process.
平均数级的便利收益过程。


参数:sigmaE
Diffusion parameter of the convenience yield process.
便利收益过程中的扩散参数。


参数:rho
Correlation coefficient between the Brownian motion driving the spot price and the convenience yield process.
之间的相关系数的布朗运动驱动的现货价格和便利收益的过程。


参数:tail
See qmvnorm of package mvtnorm.
请参阅qmvnorm包mvtnorm。


参数:...
Further arguments to be passed to methods of package mvtnorm.
进一步的参数被传递给的包mvtnorm的方法。


Details

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

The model and its parameters are described in the Details section of the schwartz2f-class documentation and in the package vignette Technical Document.<br>
该模型及其参数的描述在“详细信息”部分的schwartz2f级的文件和技术文件包中的小插曲。<BR>

The above methods rely on the functions pmvnorm, dmvnorm, and qmvnorm  of the package mvtnorm.
依靠上述方法的功能pmvnorm,dmvnorm,qmvnorm包mvtnorm。


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

dstate and pstate return a numeric, qstate returns the output of qmvnorm as a list.
dstate和pstate返回一个numeric,qstate返回的输出qmvnormlist。


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


Philipp Erb, David Luethi, Juri Hinz



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

schwartz2f-class description, rstate and simstate for random number generation, constructors schwartz2f and fit.schwartz2f.
schwartz2f级的描述,rstate和simstate产生随机数,构造函数schwartz2f和fit.schwartz2f。


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


## Create a "schwartz2f"-object[#创建的“schwartz2f”。对象]
model <- schwartz2f()

## Probability[#概率]
pstate(lower = c(0, -Inf), upper = c(45, 0.01), time = 1, model)

## Density[#密度]
dstate(x = c(50, 0.03), time = 2, model)
dstate(x = rbind(c(50, 0.03), c(50, 0.1)), time = 2, model) # x is a matrix [x是一个矩阵]

## Quantile[#位数]
qstate(p = 0.5, s0 = model)

## Generate random numbers[#生成随机数]
object <- schwartz2f(alpha = 0.05)
samples <- rstate(1000, time = 2, object)
## ...and plot histograms[#...和图直方图]
par(mfrow = c(2, 1))
hist(samples[,1])
abline(v = mean(object, time = 2)[1], col = "red")
hist(samples[,2])
abline(v = mean(object, time = 2)[2], col = "red")


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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-5-15 04:04 , Processed in 0.022105 second(s), 15 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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