rARCens: Generating Censored Autoregressive Data

Description Usage Arguments Value Author(s) See Also Examples

Description

It simulates a censored response variable with autoregressive errors of order p, with a established censoring rate.

Usage

1
rARCens(n,beta,pit,sig2,x,cens,pcens)

Arguments

n

Length of the desired time serie.

beta

Vector of theoretical regression parameters of length l.

pit

Vector of theoretical partial autocorrelations. Each element must be in (-1,1).

sig2

Theoretical variance of the error.

x

Matrix of covariates of dimension n x l (in models that include an intercept x should contain a column of ones).

cens

"left" for left censoring, "right" for right censoring.

pcens

Desired censoring rate.

Value

data

Generated response (y) and censoring indicator (cc).

param

Theoretical parameters (beta, sig2, phi).

Author(s)

Fernanda L. Schumacher <fernandalschumacher@gmail.com>, Victor H. Lachos <hlachos@ime.unicamp.br> and Christian E. Galarza <cgalarza88@gmail.com>

Maintainer: Fernanda L. Schumacher <fernandalschumacher@gmail.com>

See Also

ARCensReg

Examples

1
2
3
4
5
6
7
8
9
#generating a sample
dat = rARCens(n=100,beta = c(1,-1),pit = c(.4,-.2),
     sig2=.5,x=cbind(1,runif(100)),cens='left',pcens=.05)
#
plot.ts(dat$data$y)
table(dat$data$cc)

dat$param
#[1]  1.00 -1.00  0.50  0.48 -0.20

ARCensReg documentation built on May 2, 2019, 3:28 p.m.

Related to rARCens in ARCensReg...