Learn R Programming

VGAM (version 0.8-2)

plotrcam0: Main effects plot for a Row-Column Association Model (RCAM)

Description

Produces the main effects plot for Row-Column Association Models (RCAMs) in rcam with rank zero for some family functions. The main result of the rank-zero RCAM models is the plot of main effects (row and column).

Usage

plotrcam0(object, rfirst = 1, cfirst = 1,
            rtype = "h", ctype = "h",
            rlas = 1, rcex.lab = 1,
            rcex.axis = 1, rlabels = FALSE,
            rtick = FALSE, clas = 1, ccex.lab = 1,
            ccex.axis = 1, clabels = FALSE, ctick = FALSE,
            rmain = "Row effects", rsub = "",
            rxlabel = "", rylabel = "Row effects",
            cmain = "Column effects", csub = "", cxlabel= "",
            cylabel = "Column effects",
            rcol = par()$col, ccol = par()$col,
            ...)

Arguments

object
An rcam object.
rfirst, cfirst
rfirst is the level of row that is placed first in the row effect plot, and cfirst for the column effect.
rmain, cmain
rmain is a character of name for main label in row effect plot, and cmain for the column one.
rtype, ctype
See type argument of plot.
rlabels, clabels
Currently not functioning properly. zz. See labels argument of plot.
rsub, csub
See sub argument of plot.
rxlabel, rylabel, cxlabel, cylabel
rxlabel is a character of names for x-axis label and rylabel is for the y-axis in the row effect plot. And cxlabel and ylabel repectivrly name the x and y label on the column effect plot.
rcex.lab, ccex.lab
Both are numeric. rcex.lab is number of character expansion for row effect label, and ccex.lab for the column one.
rcex.axis, ccex.axis
Both are numeric. rcex.axis is number of character expansion for the row axis label, and ccex.axis for the column one.
rtick, ctick
Logical. rtick = TRUE means give ticks in row effect plot, and ctick for the column one.
rcol, ccol
rcol give a colour for the row effect, and ccol for the column one.
rlas, clas
Fed into las of par.
...
Arguments fed into both plot calls.

Warning

This function is not finished yet. There are many bugs!

See Also

moffset Rcam, rcam.

Examples

Run this code
# poissonff example
fit0 <- rcam(Rcam(moffset(alcoff), rbaseline = "11", cbaseline = "Monday"),
             fam = poissonff)
par(oma = c(0,0,4,0), mfrow = c(1, 2))
plotrcam0(fit0)

# negbinomial example
fit1 <- rcam(Rcam(moffset(alcoff), rbaseline = "11", cbaseline = "Monday"),
             fam = negbinomial)
par(oma = c(0,0,4,0), mfrow = c(1, 2))
plotrcam0(fit1)

# normal1 example
fit2 <- rcam(Rcam(moffset(alcoff), rbaseline = "11", cbaseline = "Monday"),
             fam = normal1)
par(oma = c(0,0,4,0), mfrow = c(1, 2))
plotrcam0(fit2)

# medpolish example
fit3 <- rcam(Rcam(moffset(alcoff), rbaseline = "11", cbaseline = "Monday"),
             fam  =  alaplace2(tau  =  0.5, intparloc  =  TRUE))
par(oma = c(0,0,4,0), mfrow = c(1, 2))
plotrcam0(fit3)

# zipoissonff example
fit4 <- rcam(Rcam(moffset(crashp), rbaseline = "11", cbaseline = "Monday"),
             fam  =  zipoissonff, Rank  =  0, trace = TRUE, crit = "l")
par(oma = c(0,0,4,0), mfrow = c(1, 2))
plotrcam0(fit4)

Run the code above in your browser using DataLab