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

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

[复制链接]
发表于 2012-9-30 14:47:27 | 显示全部楼层 |阅读模式
spd-methods(spd)
spd-methods()所属R语言包:spd

                                        Method: Semi-Parametric Distribution
                                         方法:半参数分布

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

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

Density, Distribution, Quantile and Random Number Generation methods for the Semi-Parametric Distribution.
密度,分布,分量和半参数分布的随机数生成方法。


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


dspd(x, fit, linear)
pspd(q, fit, linear)
qspd(p, fit, linear)
rspd(n, fit, linear,rseed)



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

参数:n
[rspd] - <br> the number of random deviates to be generated from fitted           distribution.   
参考的[rspd]  - 随机数的偏离产生的拟合分布。


参数:p
a vector of probability levels, the desired probability for the  quantile estimate (e.g. 0.99 for the 99th percentile).   
一个向量的概率水平,分位数估计所需的概率(例如第99百分位数为0.99)。


参数:x,q
[pspd,dspd] - <br> a numeric vector of quantiles.  
[PSPD,DSPD]  -  <BR>一个数值向量的位数。


参数:fit
[all] - <br> the object of class SPDFIT created by calling the spdfit function.  
[全部]  - 参考的对象创建通过调用spdfit功能的类SPDFIT。


参数:linear
[all] - <br> logical, if TRUE interior smoothing function uses linear interpolation rather than constant.  
所有]  -  <BR>的逻辑,,如果TRUE内部平滑功能,而不是使用线性内插不变。


参数:rseed
[rspd] - <br> numeric, optional seed value to initiate the random number generator.  
的[rspd]  - 参考数字,可选的种子值开始的随机数发生器。


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

All values are numeric vectors: <br> d* returns the density (pdf), <br> p* returns the probability (cdf), <br> q* returns the quantiles (inverse cdf), and <br> r* generates random deviates.
所有的值都是数字向量<BR> d*返回的密度(PDF),参考p*返回的概率,参考q*返回位数(逆累积分布函数(CDF) ),和参考r*随机产生的偏离。


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

The density is computed using the generalized pareto distribution in the tails, while for the middle, the density is computed by using a smooth gradient approach. Interpolation is used to splice together the ends with the middle portion, providing for an approximate piecewise constant density function. As such, caution should be used when interpreting results obtained by use of this function.
密度计算的广义帕累托分布的尾部,而中间,密度的计算方法是使用平滑渐变的方法。插值用于接合在一起的中间部的端部,提供一个近似的分段恒定密度函数。因此,应谨慎解释结果时,使用此功能。


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



Alec Stephenson for the functions from R\'s <code>evd</code> package, <br>
Alec Stephenson for the functions from R\'s <code>evir</code> package, <br>
Alexander McNeil for the EVIS functions underlying the <code>evir</code> package, <br>
Diethelm Wuetrz for the <code>fExtremes</code> Implementation of the gpd, <br>
Alexios Ghalanos for the SPD Implementation, <br>




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

Carmona, R. (2004);Statistical Anlaysis of Financial Data in Splus,  Springer.

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


library(MASS)
x = SP500/100
fit=spdfit(x, upper=0.9, lower=0.1)
## rspd  -[#rspd  - ]
   par(mfrow = c(2, 2), cex = 0.7)
   r = rspd(n = 1000, fit)
   hist(r, n = 100, probability = TRUE, xlab = "r",
   col = "steelblue", border = "white",main = "Density")
   box()
## dspd -[#DSPD  - ]
   # Plot empirical density and compare with true density:[绘制经验密度和真密度比较:]
   r = rspd(n = 1000, fit)
   hist(r, n = 100, probability = TRUE, xlab = "r",
   col = "steelblue", border = "white",main = "Density")
   box()
   x = seq(-0.3, 0.3, length.out = 1000)
   lines(x, dspd(x, fit), col = "darkorange",lwd=2)
   
## pspd -[#PSPD  - ]
   # Plot df and compare with true df:[图DF和与真正DF:]
   plot(sort(r), (1:length(r)/length(r)),
   ylim = c(0, 1), pch = 19,
   cex = 0.5, ylab = "p", xlab = "q", main = "CDF")
   grid()
   q = seq(-0.3, 0.3, length.out = 1000)
   lines(q, pspd(q, fit), col = "darkorange",lwd=2)


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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-6-18 03:52 , Processed in 0.021531 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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