R的三次样条系数

时间:2019-01-28 01:31:55

标签: r statistics spline cubic-spline

我拟合了一个非常简单的1结的三次样条。我要做的只是弄清楚如何获取R输出的系数,以便可以在excel中实现它们。

    n<-lm(Model_Set$LOG_BAL ~ bs(Model_Set$LOG_SPREAD, knots = c(-.0697), degree = 3))
summary(n)$coefficients

产生以下内容:

                                                               Estimate Std. Error    t value     Pr(>|t|)
(Intercept)                                                4.092292   1.100231  3.7194845 3.957253e-04
bs(Model_Set$LOG_SPREAD, knots = c(-0.0697), degree = 3)1  1.917321   2.557573  0.7496643 4.559338e-01
bs(Model_Set$LOG_SPREAD, knots = c(-0.0697), degree = 3)2 -1.441826   2.425521 -0.5944399 5.541075e-01
bs(Model_Set$LOG_SPREAD, knots = c(-0.0697), degree = 3)3  7.655745   1.236518  6.1913734 3.435152e-08
bs(Model_Set$LOG_SPREAD, knots = c(-0.0697), degree = 3)4  6.810974   1.220661  5.5797432 4.114150e-07

我该如何转换以便可以在Excel中实现?

0 个答案:

没有答案