Description Usage Arguments Author(s) See Also Examples
Estimating coefficients for penalized dynamic regression in the presence of autocorrelated residuals using an iterative 6-step procedure.
1 2 |
data |
Data matrix of order (time, response, covariates) |
da |
A vector of lags. Autoregressive orders for the response. For example 1:p for all lags from 1 to p |
ar |
A vector of lags. Autoregressive orders for residuals. For example 1:q for all lags from 1 to q |
mselection |
Model selection criteria. Choosing among 1 (CP), 2 (AIC), 3 (GCV) and 4 (BIC) |
type |
Type of penalty. Choosing between 'enet' and 'alasso' for DREGAR and adaptive-DREGAR penalties. |
normalize |
Logical flag. Setting to TRUE to normalise data prior to analysis |
iteration |
The number of iterations |
intercept |
Logical flag. Setting to TRUE to have intercept in the model. |
Hamed Haselimashhadi <hamedhaseli@gmail.com>
dregar2
,
generateAR
,
sim.dregar
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | par(mfrow=c(2,2))
m=sim.dregar(n=500 , beta=1:4, phi=generateAR(2), theta=.1,
n.z.coeffs=3 , plot=TRUE) # generating data
r=dregar6(data=m$rawdata, da = 1:3,
ar = 1:2,mselection = 4,
type='alasso')# estimating parameters using (non-apdative) DREGAR
round(cbind(
true = c(phi=c(m$phi,0),theta=c(m$theta,0),beta=m$beta),
estimates = c(phi=r$phi,theta=r$theta,beta=r$beta)
)
,3
)
plot(r$mod.phi,main='phi')
plot(r$mod.theta,main='theta')
plot(r$mod.beta,main='beta')
|
please wait ...
Iteration 0 / 15
Iteration 0 / 15
Iteration 0 / 15
Iteration 1 / 15
Iteration 1 / 15
Iteration 1 / 15
Iteration 2 / 15
Iteration 2 / 15
Iteration 2 / 15
Iteration 3 / 15
Iteration 3 / 15
Iteration 3 / 15
Iteration 4 / 15
Iteration 4 / 15
Iteration 4 / 15
Iteration 5 / 15
Iteration 5 / 15
Iteration 5 / 15
Iteration 6 / 15
Iteration 6 / 15
Iteration 6 / 15
Iteration 7 / 15
Iteration 7 / 15
Iteration 7 / 15
Iteration 8 / 15
Iteration 8 / 15
Iteration 8 / 15
Iteration 9 / 15
Iteration 9 / 15
Iteration 9 / 15
Iteration 10 / 15
Iteration 10 / 15
Iteration 10 / 15
Iteration 11 / 15
Iteration 11 / 15
Iteration 11 / 15
Iteration 12 / 15
Iteration 12 / 15
Iteration 12 / 15
Iteration 13 / 15
Iteration 13 / 15
Iteration 13 / 15
Iteration 14 / 15
Iteration 14 / 15
Iteration 14 / 15
Iteration 15 / 15
Iteration 15 / 15
Iteration 15 / 15 true estimates
phi1 0.732 0.736
phi2 -0.107 -0.095
phi3 0.000 0.000
theta1 0.100 0.000
theta2 0.000 0.000
beta1 1.000 0.928
beta2 2.000 2.009
beta3 3.000 3.351
beta4 4.000 3.839
beta5 0.000 0.000
beta6 0.000 0.000
beta7 0.000 0.000
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.