locally.weighted.polynomial(SiZer)
locally.weighted.polynomial()所属R语言包:SiZer
Locally-Weighted Polynomial Regression Smoother
本地加权多项式回归平滑
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Smoothes the given bivariate data using kernel regression.
使用核回归平滑的二元数据。
用法----------Usage----------
locally.weighted.polynomial(x, y, h = NA, x.grid = NA,
degree = 1, kernel.type = "Normal")
参数----------Arguments----------
参数:x
Vector of data for the independent variable
为独立变量的向量数据
参数:y
Vector of data for the dependent variable
为因变量的向量数据
参数:h
The bandwidth for the kernel
的带宽为内核
参数:x.grid
What x-values should the value of the smoother be calculated at.
什么x值应该被计算的值的平滑。
参数:degree
The degree of the polynomial to be fit at each x-value. The default is to fit a linear regression, ie degree=1.
多项式的次数,以适合于每个x值。默认情况下是适合的线性回归,即度= 1。
参数:kernel.type
What kernel to use. Valid choices are 'Normal', 'Epanechnikov', 'biweight', and 'triweight'
使用什么内核。有效的选择是“Normal”(标准),“叶帕涅奇尼科夫,biweight,和”triweight
Details
详细信息----------Details----------
The confidence intervals are created using the row-wise method of Hannig and Marron (2006).
行明智的方法Hannig和马龙(2006年)创建的置信区间。
Notice that the derivative to be estimated must be less than or equal to the degree of the polynomial initially fit to the data.
请注意,要估计的衍生物必须小于或等于最初适合数据的多项式的次数。
If the bandwidth is not given, the Sheather-Jones bandwidth selection method is used.
如果带宽没有给出,Sheather - 琼斯的带宽选择方法。
值----------Value----------
Returns a LocallyWeightedPolynomial object that has the following elements: <table summary="R valueblock"> <tr valign="top"><td>data</td> <td> A structure of the data used to generate the smoothing curve</td></tr> <tr valign="top"><td>h</td> <td> The bandwidth used to generate the smoothing curve.</td></tr> <tr valign="top"><td>x.grid</td> <td> The grid of x-values that we have estimated function value and derivative(s) for.</td></tr> <tr valign="top"><td>degrees.freedom</td> <td> The effective sample size at each grid point</td></tr> <tr valign="top"><td>Beta</td> <td> A matrix of estimated beta values. The number of rows is degrees+1, while the number of columns is the same as the length of x.grid. Notice that
返回LocallyWeightedPolynomial对象具有以下元素:<table summary="R valueblock"> <tr valign="top"> <TD> data</ TD> <td>一个结构用于生成的平滑曲线的数据</ TD> </ TR> <tr valign="top"> <TD>h</ TD> <td>使用的带宽,用于生成的平滑曲线。</运输署> </ TR> <tr valign="top"> <TD> x.grid </ TD> <TD>我们估计的x值,函数值及衍生工具(S)的网格。</ TD > </ TR> <tr valign="top"> <TD> degrees.freedom</ TD> <TD>,有效样本,在每个格点大小</ TD> </ TR> <TR VALIGN =“顶部“> <TD> Beta </ TD> <TD>估计beta值的矩阵。的行数是度1,而列的数目是相同的作为x.grid的长度。请注意,
<p align="center"> \hat{f'}(x_i) = β[2,i]*1!
<p ALIGN="CENTER"> \hat{f'}(x_i) = β[2,i]*1!
<p align="center"> \hat{f''}(x_i) = β[3,i]*2!
<p ALIGN="CENTER"> \hat{f''}(x_i) = β[3,i]*2!
参数:Beta.var
Matrix of estimated variances for Beta. Same structure as Beta.
矩阵的估计方差Beta。同样的结构Beta。
(作者)----------Author(s)----------
Derek Sonderegger
参考文献----------References----------
Chaudhuri, P., and J. S. Marron. 1999. SiZer for exploration of structures in curves. Journal of the American Statistical Association 94 807-823.
Hannig, J., and J. S. Marron. 2006. Advanced distribution theory for SiZer. Journal of the American Statistical Association 101 484-499.
Sonderegger, D.L., Wang, H., Clements, W.H., and Noon, B.R. 2009. Using SiZer to detect thresholds in ecological data. Frontiers in Ecology and the Environment 7:190-195
参见----------See Also----------
SiZer, plot.LocallyWeightedPolynomial, spm in package 'SemiPar',
SiZer,plot.LocallyWeightedPolynomial,spm包半参数“,
实例----------Examples----------
data(Arkansas)
x <- Arkansas$year
y <- Arkansas$sqrt.mayflies
layout(cbind(1,2,3))
model <- locally.weighted.polynomial(x,y)
plot(model, main='Smoothed Function', xlab='Year', ylab='Sqrt.Mayflies')
model2 <- locally.weighted.polynomial(x,y,h=.5)
plot(model2, main='Smoothed Function', xlab='Year', ylab='Sqrt.Mayflies')
model3 <- locally.weighted.polynomial(x,y, degree=1)
plot(model3, derv=1, main='First Derivative', xlab='Year', ylab='1st Derivative')
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|