drawSample function

Sampling from a distributed-lag linear structural equation model

Sampling from a distributed-lag linear structural equation model

A future sample from a distributed-lag linear structural equation model is drawn.

drawSample(x, n)

Arguments

  • x: An object of class dlsem.
  • n: The sample size (temporal horizon).

Returns

An object of class data.frame.

Note

Sampling is conditioned to the most recent observed value of all the variables.

For variables subdued to logarithmic transformation and/or differencing, the sampled values are in logarithmic scale and/or after differencing, as well.

If a group factor was specified for the model, a sample of size n is drawn for each group.

See Also

dlsem .

Examples

data(industry) indus.code <- list( Consum~ecq(Job,0,5), Pollution~ecq(Job,1,8)+ecq(Consum,1,7) ) indus.mod <- dlsem(indus.code,group="Region",time="Year",exogenous=c("Population","GDP"), data=industry,log=TRUE) drawSample(indus.mod,10)
  • Maintainer: Alessandro Magrini
  • License: GPL-2
  • Last published: 2020-04-16

Useful links