相关疑难解决方法(0)

`poly()`如何生成正交多项式?如何理解"coefs"归来?

我对正交多项式的理解是它们采用的形式

y(x)= a1 + a2(x - c1)+ a3(x - c2)(x - c3)+ a4(x - c4)(x - c5)(x - c6)......最多为期望的条款

其中a1,a2 是每个正交项的系数(在拟合之间变化),并且c1,c2 是正交项内的系数,确定使得这些项保持正交性(使用相同x值的拟合之间一致)

我理解poly()用于拟合正交多项式.一个例子

x = c(1.160, 1.143, 1.126, 1.109, 1.079, 1.053, 1.040, 1.027, 1.015, 1.004, 0.994, 0.985, 0.977) # abscissae not equally spaced

y = c(1.217395, 1.604360, 2.834947, 4.585687, 8.770932, 9.996260, 9.264800, 9.155079, 7.949278, 7.317690, 6.377519, 6.409620, 6.643426)

# construct the orthogonal polynomial
orth_poly <- poly(x, degree …
Run Code Online (Sandbox Code Playgroud)

regression r matrix linear-regression lm

9
推荐指数
1
解决办法
2359
查看次数

标签 统计

linear-regression ×1

lm ×1

matrix ×1

r ×1

regression ×1