carxSimCenTS: simulate a sample 'cenTS' data for 'carx'

Description Usage Arguments Value See Also Examples

View source: R/carx_simulate.R

Description

Use provided parameters and other settings to simulate a series of data as a cenTS object.

Usage

1
2
3
4
carxSimCenTS(nObs = 200, prmtrAR = c(-0.28, 0.25), prmtrX = c(0.2, 0.4),
  sigma = 0.6, lcl = -1, ucl = 1, x = NULL, seed = NULL,
  value.name = "y", end.date = Sys.Date(), inno.dist = c("normal", "t"),
  t.df = 5)

Arguments

nObs

number of observations to be simulated.

prmtrAR

the AR parameter.

prmtrX

the regression parameters for X.

sigma

the innovation standard deviation for the AR process.

lcl

the lower censoring limit.

ucl

the upper censoring limit.

x

optional matrix for X. Default = NULL, in which case X will be simulated from the standard normal distribution with dimensions determined by nObs and prmtrX.

seed

optional to set the seed of random number generator used by R, default=NULL.

value.name

the name of the response series

end.date

the date of the last observation, default = Sys.date().

inno.dist

innovation distribution, can be "normal" or "t", default="normal". If it is "t", its degree of freedom should be supplied in t.df.

t.df

the degree of freedom of the t distribution, used only if inno.dist="t". Default=5.

Value

a cenTS object with regressors.

See Also

carxSim.

Examples

1
cts = carxSimCenTS()

carx documentation built on May 29, 2017, 6:28 p.m.

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