lines.mvna: Lines method for 'mvna' objects

Description Usage Arguments Value Author(s) See Also Examples

Description

Lines method for mvna objects.

Usage

1
2
3
4
5
## S3 method for class 'mvna'
lines(x, tr.choice, col = 1, lty, conf.int = FALSE,
      level = 0.95, var.type = c("aalen", "greenwood"),
      ci.fun = c("log", "linear", "arcsin"), ci.col = col,
      ci.lty = 3, ...)

Arguments

x

An object of class mvna.

tr.choice

A character vector of the form c("from to", "from to") specifying which transitions should be displayed. By default, all the transition hazards are plotted.

col

A vector of colours. Default is black.

lty

A vector of line types. Default is 1:number of transitions.

conf.int

Logical. Indicates whether to display pointwise confidence interval. Default is FALSE.

level

Level of the confidence interval. Default is 0.95.

var.type

Specifies the variance estimator that should be used to compute the confidence interval. One of "aalen" or "greenwood". Default is "aalen".

ci.fun

Specifies the transformation applied to the confidence interval. Choices are "linear", "log", "arcsin". Default is "log".

ci.col

Colours of the confidence interval lines. By default, ci.col equals col.

ci.lty

Line types for the confidence intervals. Default is 3.

...

Further arguments for lines.

Value

No value returned.

Author(s)

Arthur Allignol, arthur.allignol@gmail.com

See Also

mvna, plot.mvna

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
data(sir.adm)

## data set transformation
data(sir.adm) 
id <- sir.adm$id
from <- sir.adm$pneu
to <- ifelse(sir.adm$status==0,"cens",sir.adm$status+1)
times <- sir.adm$time
dat.sir <- data.frame(id,from,to,time=times)

## Possible transitions
tra <- matrix(ncol=4,nrow=4,FALSE)
tra[1:2,3:4] <- TRUE

na.pneu <- mvna(dat.sir,c("0","1","2","3"),
                tra,"cens")

plot(na.pneu, tr.choice = c("0 2"), conf.int = TRUE,
     col = 1, lty = 1, legend = FALSE)

lines(na.pneu, tr.choice = c("1 2"), conf.int = TRUE,
      col = 2, lty = 1)

Example output



mvna documentation built on May 1, 2019, 10:16 p.m.