Description Usage Arguments Details Value Author(s) References See Also Examples
View source: R/plot_n_text_nouse.R
Plots an LongCART object on the current graphics device.
1 2 | plotLongCART(x, uniform = FALSE, branch = 1, nspace,
margin = 0, minbranch = 0.3, ...)
|
x |
a fitted object of class |
uniform |
similar to |
branch |
similar to |
nspace |
similar to |
margin |
similar to |
minbranch |
similar to |
... |
arguments to be passed to or from other methods. |
This function is a method for the generic function plot, for objects of class
LongCART
. The y-coordinate of the top node of the tree will always be 1.
The coordinates of the nodes are returned as a list, with components x
and y
.
Madan Gopal Kundu madan_g.kundu@yahoo.com
Kundu, M. G., and Harezlak, J. (2019). Regression trees for longitudinal data with baseline covariates. Biostatistics & Epidemiology, 3(1):1-22.
textLongCART
, LongCART
, StabCat
, StabCont
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | #--- Get the data
#data(ACTG175)
#--- Run LongCART()
#gvars=c("age", "gender", "wtkg", "hemo", "homo", "drugs",
# "karnof", "oprior", "z30", "zprior", "preanti", "race",
# "str2", "symptom", "treat", "offtrt")
#tgvars=c(1, 0, 1, 0, 0, 0,
# 1, 0, 0, 0, 1, 0,
# 0, 0, 0, 0)
#out<- LongCART(data=ACTG175, patid="pidnum", fixed=cd4~time,
# gvars=gvars, tgvars=tgvars, alpha=0.05,
# minsplit=100, minbucket=50, coef.digits=2)
#--- Plot tree
#par(xpd = TRUE)
#plot(out, compress = TRUE)
#text(out, use.n = TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.