sim.dregar: Simulating data from DREGAR model

Description Usage Arguments Author(s) See Also Examples

View source: R/sim.dregar.R

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

dregar2 , dregar6 , 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)

DREGAR documentation built on May 29, 2017, 9:37 p.m.

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