全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学 R语言论坛
9946 7
2011-04-20
请教各位大侠关于局部多项式回归有没有具体的软件操作资料可依据,本人是R软件初学者,关于locpoly(x,y,bandwidth=h)这样一个命令能输出什么预测值?应用什么函数调用呢?  目前自己只知道用lines()画出图像,使用summary()时输出
Length Class
Mode

x 401
-none- numeric

y 401
-none- numeric

这个代表什么意思呢?  不是按理论来讲应该要输出在每一观测点的多项式展开式的系数预测值吗?该用什么命令?
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

全部回复
2012-1-5 18:45:27
locpoly是非参数方法中的局部线性估计。可以再R软件中用?locpoly查看函数解释。
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2012-1-5 18:47:05
Usage
locpoly(x, y, drv = 0L, degree, kernel = "normal",
        bandwidth, gridsize = 401L, bwdisc = 25,
        range.x, binned = FALSE, truncate = TRUE)

Arguments
x vector of x data. Missing values are not accepted.  
bandwidth the kernel bandwidth smoothing parameter. It may be a single number or an array having length gridsize, representing a bandwidth that varies according to the location of estimation.  
y vector of y data. This must be same length as x, and missing values are not accepted.  
drv order of derivative to be estimated.  
degree degree of local polynomial used. Its value must be greater than or equal to the value of drv. The default value is of degree is drv + 1.  
kernel "normal" - the Gaussian density function. Currently ignored.  
gridsize number of equally-spaced grid points over which the function is to be estimated.  
bwdisc number of logarithmically-equally-spaced bandwidths on which bandwidth is discretised, to speed up computation.  
range.x vector containing the minimum and maximum values of x at which to compute the estimate.  
binned logical flag: if TRUE, then x and y are taken to be grid counts rather than raw data.  
truncate logical flag: if TRUE, data with x values outside the range specified by range.x are ignored.  
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2014-12-3 09:04:36
请问解决了吗,要输出在每一观测点的多项式展开式的系数预测值吗?该用什么命令?

二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2015-6-17 13:51:58
建议使用Piecewise Polynomials方法,即把自变量分成不同的连续区域,针对不同区域拟合不同的多项式回归。
library(spline)
fit<-lm(y~bs(x,df=))
其中df默认为3,即有立方项。
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2017-3-30 20:53:54
可以展开的,不过要用到一个函数,我找了好久才找到,一般书上都不写这个
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

点击查看更多内容…
相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群