confint.slm: Confidence intervals for the Model Parameters

Description Usage Arguments Value References See Also Examples

View source: R/slm-method.R

Description

Computes confidence intervals for the model parameters.

Usage

1
2
## S3 method for class 'slm'
confint(object, parm = NULL, level = 0.95, ...)

Arguments

object

a fitted model object of class slm.

parm

a vector of integer. Specifies the coordinates of the vector of parameters for which a confidence interval will be given. If missing, all parameters are considered.

level

a number between 0 and 1; the confidence level required.

...

additional argument(s) for methods.

Value

This function returns the confidence intervals for the parameters of the model.

References

E. Caron, J. Dedecker and B. Michel (2019). Linear regression with stationary errors: the R package slm. arXiv preprint arXiv:1906.06583. https://arxiv.org/abs/1906.06583.

See Also

confint.lm.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
data("shan")
reg1 = slm(shan$PM_Xuhui ~ . , data = shan, method_cov_st = "fitAR", model_selec = -1)
confint(reg1, level = 0.8)

data("co2")
y = as.vector(co2)
x = as.vector(time(co2)) - 1958
reg2 = slm(y ~ x + I(x^2) + I(x^3) + sin(2*pi*x) + cos(2*pi*x) + sin(4*pi*x) +
 cos(4*pi*x) + sin(6*pi*x) + cos(6*pi*x) + sin(8*pi*x) + cos(8*pi*x),
 method_cov_st = "fitAR", model_selec = -1, plot = TRUE)
confint(reg2, level = 0.9)

Example output

                       10 %          90 %
(Intercept)   -238.46532405  1.287464e+02
PM_Jingan        0.56000754  6.329723e-01
PM_US.Post       0.33607506  4.151967e-01
DEWP            -1.46942465 -6.084565e-01
HUMI             0.17237285  4.110538e-01
PRES            -0.15096832  2.015420e-01
TEMP             0.86853443  1.742551e+00
Iws             -0.01495146 -3.478759e-04
precipitation    0.30186979  6.238995e-01
Iprec           -0.20831071 -4.260039e-02
                            5 %          95 %
(Intercept)        3.150931e+02  3.163986e+02
x                  1.841316e-01  4.546271e-01
`I(x^2)`           3.316748e-02  4.836308e-02
`I(x^3)`          -5.784102e-04 -3.340011e-04
`sin(2 * pi * x)`  2.673123e+00  2.829016e+00
`cos(2 * pi * x)` -4.735546e-01 -3.183986e-01
`sin(4 * pi * x)` -7.080791e-01 -6.405999e-01
`cos(4 * pi * x)`  3.449131e-01  4.120423e-01
`sin(6 * pi * x)` -1.265427e-01 -8.181992e-02
`cos(6 * pi * x)` -6.624994e-02 -2.152713e-02
`sin(8 * pi * x)`  6.683760e-02  1.078306e-01
`cos(8 * pi * x)` -1.803472e-02  2.315309e-02

slm documentation built on Aug. 31, 2020, 5:11 p.m.