plotrcam0(object, centered = TRUE, whichplots = c(1, 2),
hline0 = TRUE, hlty = "dashed", hcol = par()$col, hlwd = par()$lwd,
rfirst = 1, cfirst = 1,
rtype = "h", ctype = "h",
rcex.lab = 1, rcex.axis = 1, rtick = FALSE,
ccex.lab = 1, ccex.axis = 1, ctick = FALSE,
rmain = "Row effects", rsub = "",
rxlab = "", rylab = "Row effects",
cmain = "Column effects", csub = "",
cxlab= "", cylab = "Column effects",
rcol = par()$col, ccol = par()$col, ...)
rcam
object.
This should be of rank-0, i.e., main effects only and no
interactions.0
, say, for no plots at all.TRUE
then the row and column effects are centered
(but not scaled) by scale
.
If FALSE
then the raw effects are used (of which
the first are zero by definitionhline0
is logical. If TRUE
then a horizontal line is
plotted at 0 and the other arguments describe this line.
Probably having hline0 = TRUE
only makes sense when
centered = TRUE
.rfirst
is the level of row that is placed first in the
row effects plot, etc.rmain
is the main label in the row effects plot, etc.type
and sub
arguments of
plot
.rxlab
is xlab
and
rylab
is ylab
;
see par
.
Ditto for cxlab
and cylab
for trcex.lab
is cex
for the row effects plot label,
etc.rcex.axis
is the cex
argument for the row effects axis label,
etc.rtick = TRUE
then add ticks to the row effects plot, etc.rcol
give a colour for the row effects plot,
etc.plot
calls.post
slot
assigned additional information from the plot.centered = FALSE
is relative
to the baseline (reference level) of a row and column, and
should also be considered in light of the link function used.
Many arguments that start with "r"
refer to the row
effects plot, and "c"
for the column
effects plot.moffset
Rcam
,
rcam
.alcoff.e <- moffset(alcoff, "6", "Monday", postfix = "*") # Effective day
fit0 <- rcam(alcoff.e, family = poissonff)
par(oma = c(0, 0, 4, 0), mfrow = 1:2) # For all plots below too
ii = plot(fit0, rcol = "blue", ccol = "orange",
lwd = 4, ylim = c(-2, 2), # A common ylim
cylab = "Effective daily effects", rylab = "Hourly effects",
rxlab = "Hour", cxlab = "Effective day")
ii@post # Endowed with additional information
# Negative binomial example
fit1 <- rcam(alcoff.e, negbinomial, trace = TRUE)
plot(fit1, ylim = c(-2, 2))
# Univariate normal example
fit2 <- rcam(alcoff.e, normal1, trace = TRUE)
plot(fit2, ylim = c(-200, 400))
# Median-polish example
fit3 <- rcam(alcoff.e, alaplace2(tau = 0.5, intparloc = TRUE),
trace = TRUE)
plot(fit3, ylim = c(-200, 250))
# Zero-inflated Poisson example on "crashp" (no 0s in alcoff)
cbind(rowSums(crashp)) # Easy to see the data
cbind(colSums(crashp)) # Easy to see the data
fit4 <- rcam(Rcam(crashp, rbaseline = "5", cbaseline = "Sunday"),
zipoissonff, trace = TRUE)
plot(fit4, ylim = c(-3, 3))
Run the code above in your browser using DataLab