Description Usage Arguments Author(s) Examples
Makes a caterpillar plot from a gls object. Plot shows estimates for each coefficient, plus 95% CI's for each, defined as +/- 2 se's
1 | caterplot.gls(caterprep.out, which = -1, col.breaks = -1, colors = -1)
|
caterprep.out |
An object returned from caterprep.gls() |
which |
A vector of which elements to plot. A value of -1 specifies all but the intercept. |
col.breaks |
A vector of breakpoints in element numbers for each color, defined as the first element of a given color. If col=c(1,2,3) and col.breaks=c(1,4,9), then elements 1-3 get color 1, 4-8 get color 2, and 9-end get color 3. |
colors |
A vector of colors to use |
Matt Tyers
1 2 3 4 5 6 7 8 9 10 11 | # ------- first some data ------ #
Factor <- sample(c("A","B","C","D"),1000,replace=T)
x <- 1:1000
means <- 2*x+1*(Factor=="A")+3*(Factor=="B")+4*(Factor=="C")+2*(Factor=="D")
y <- rnorm(1000,means,4)
library(nlme)
model <- gls(y~Factor*x)
# --------- now the function ---------- #
prep.out <- caterprep.gls(model)
caterplot.gls(prep.out)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.