estimate_para_adaptive_method {PerRegMod} | R Documentation |
estimate_para_adaptive_method() function gives the adaptive estimation of parameters of a periodic coefficients regression model.
estimate_para_adaptive_method(n,s,y,x)
n |
The length of vector |
s |
A period of the regression model. |
y |
A response variable. |
x |
A list of independent variables with dimension |
beta_ad |
Parameters to be estimated. |
set.seed(6)
n=400
s=4
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)
model=lm(y~x1+x2+x3+x4)
z=model$residuals
estimate_para_adaptive_method(n,s,y,x)