nm.covplot | R Documentation |
Create ETA vs covariates and parameter estimates vs covariates. Programmed with the intention to get between 95-100% of report Appendices ready plots. If not, the data.frames on basis of which they were created are available as well to enable creating the desired graphs very easily.
nm.covplot(
run = "run1",
path = getOption("nmDir"),
id.var = "ID",
iov = FALSE,
eta.densities = TRUE,
eta.skip = NULL,
shrinkage = FALSE,
covlist = list(cat = c(NULL), con = c(NULL)),
catcov.sep = 5,
parameters = NULL,
aspect = "fill",
pcx = 0.5,
uniques = FALSE,
which.list = 1
)
run |
run rootname (e.g. |
path |
directory where |
id.var |
character string denoting grouping variable ("ID") |
iov |
inter-occasion variability flag (this argument is ignored currently) |
eta.densities |
logical to determine of ETA density plots have to be generated |
eta.skip |
character vector of ETAs that will be skipped |
shrinkage |
providing shrinkage values. This is currently ignored |
covlist |
a list with elements |
catcov.sep |
max number of unique values for a covariate to be assigned 'categorical' |
parameters |
a character vector with parameter names to plot |
aspect |
lattice banking aspect for rectangular or square plots. Defaults to 'fill' |
pcx |
dot size |
uniques |
set to TRUE to look at one value per ID only. defaults to F |
which.list |
which element of the list in case multiple regression methods were used. Defaults to 1. |
A list with plots and properly sorted / molten data.frames for customized plots
args(nm.covplot)
nmcov = nm.covplot(path = getOption("qpExampleDir")
, run = "example2", parameters = c("CL","V1","Q","V2")
, covlist = list(con = "AGE", cat = "GNDR"))
#contents of the list
names(nmcov)
#[1] "covdata" "eta.splom" "eta.dens"
# "conData.eta" "catData.eta" "conData.par" "catData.par"
#[8] "etaContVarPlot" "etaCatVarPlot" "parContVarPlot" "parCatVarPlot"
# let's look at the plots
nmcov$eta.dens()
# red line is the distribution predicted obo OMEGA estimate
# the grey polygon is the actual ETA distribution
## elegant pairs plot
nmcov$eta.splom()
## ETAs vs. Continuous Covariates
nmcov$etaContVarPlot()
## ETAs vs. Categorical Covariates
nmcov$etaCatVarPlot()
nmcov$etaCatVarPlot(F)
## parameters vs. Continuous Covariates
nmcov$parContVarPlot()
## parameters vs. Categorical Covariates
nmcov$parCatVarPlot()
## data frames required to replot the above are right there for convenience
head(nmcov$covdata) ## merged get.xpose.table and nm.params.table output!
head(nmcov$conData.eta)# essential: conVariable conValue variable value
head(nmcov$catData.eta)# essential: catVariable catValue variable value
head(nmcov$conData.par)# essential: conVariable conValue variable value
head(nmcov$catData.par)# essential: catVariable catValue variable value
#for continuous plots get kickstarted with:
# xyplot(value ~ conValue | casefold(variable, upper = TRUE) * conVariable
# , data = conData, panel = panel.xyplot)
#for categorical plots:
# xyplot(value ~ as.factor(paste(catValue)) | variable * catVariable
# , data = catData, panel = panel.bwplot, horizontal = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.