dregar2 function

Estimating adaptive/non-adaptive DREGAR coefficients using an iterative 6-step procedure

Estimating adaptive/non-adaptive DREGAR coefficients using an iterative 6-step procedure

Estimating coefficients for penalized dynamic regression in the presence of autocorrelated residuals using an iterative 6-step procedure.

dregar6(data , da, ar, mselection = 4, type = "alasso", normalize = FALSE, iteration = 15, intercept=FALSE)

Arguments

  • 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.

Author(s)

Hamed Haselimashhadi hamedhaseli@gmail.com

See Also

dregar2, generateAR , sim.dregar

Examples

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')