sim.dregar: Simulating data from DREGAR model

Description Usage Arguments Author(s) See Also Examples

Description

Simulating a mean zero Gaussian lagged response regression in the presence of autocorrelated residuals

Usage

1
2
3
  sim.dregar(n = 500    , beta = 1, ind = FALSE  , 
             phi = .3, theta = .5, var = 1 , n.z.coeffs=0,
             shuffle = FALSE     , plot = FALSE  )

Arguments

n

The number of data points to be simulated

beta

Regression coefficients

ind

Logical flag. If TRUE then observations are assumed to be independent. Otherwise they are generated from random AR(1) processes. In both cases, variables are assumed to be mutually independent and follow Gaussian distribution.

phi

Dynamic coefficient(s)

theta

Residuals coefficient(s)

var

Variance of the error term

n.z.coeffs

Number of zero coefficients if needed

shuffle

Logical flag. If TRUE shuffle coefficients. Otherwise data are grouped corresponded to non-zero and zero coefficients.

plot

Logical flag. Plot response

Author(s)

Hamed Haselimashhadi <hamedhaseli@gmail.com>

See Also

dregar , generateAR

Examples

1
2
3
4
  simdata=sim.dregar(n = 100 , beta = 1,
    ind = TRUE , phi = .40 , theta = -.25,
    var = 1 , plot = TRUE)
  str(simdata)


Search within the DREGAR package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.