Learn R Programming

PerRegMod (version 4.4.3)

lm_per_AE: Fitting periodic coefficients regression model by using Adaptive estimation method

Description

lm_per_AE() function gives the adaptive estimation of parameters, intercept \(\mu_s\), slope \(\boldsymbol{\beta}_s\), and standard deviation \(\sigma_s\), of a periodic coefficients regression model. \(\widehat{\boldsymbol{\theta}}_{AE} ={\widehat{\boldsymbol{\vartheta} }_{LSE} }+\frac{1}{\sqrt{n}}{\mathbf{\Gamma}}^{-1}\mathbf{\Delta}\).

Usage

lm_per_AE(x,y,s)

Value

Residuals

the residuals, that is response minus fitted values

Coefficients

a named vector of coefficients

Root mean square error

The root mean square error

Arguments

x

A list of independent variables with dimension \(p\).

y

A response variable.

s

A period of the regression model.

Examples

Run this code
set.seed(6)
n=200
s=2
x1=rnorm(n,0,1.5)
x2=rnorm(n,0,0.9)
x3=rnorm(n,0,2)
x4=rnorm(n,0,1.9)
y=rnorm(n,0,2.5)
x=list(x1,x2,x3,x4)
lm_per_AE(x,y,s)

Run the code above in your browser using DataLab