vit.fitted {MBESS}R Documentation

Visualize individual trajectories with fitted curve and quality of fit

Description

A function to help visualize individual trajectories in a longitudinal (i.e., analysis of change) context with fitted curve and quality of fit after analyzing the data with lme, lmer, or nlme function.

Usage

vit.fitted(fit.Model, layout = c(3, 3), ylab = "", xlab = "", 
pct.rand = NULL, number.rand = NULL, subset.ids = NULL, 
same.scales = TRUE, save.pdf = FALSE, save.eps = FALSE, 
save.jpg = FALSE, file = "", ...)

Arguments

fit.Model lme, nlme object produced by nlme package or lmer object produced by lme4 package
layout define the per-page layout when All.in.One==FALSE
ylab label for the ordinate (i.e., y-axis; see par)
xlab label for the abscissa (i.e., x-axis; see par)
pct.rand percentage of random trajectories to be plotted
number.rand number of random trajectories to be plotted
subset.ids id values for a selected subset of individuals to be plotted
same.scales should the y-axes have the same scales
save.pdf save a pdf file
save.eps save a postscript file
save.jpg save a jpg file
file file name and file path for the graph(s) to save, if file="" a file would be saved in the current working directory
... optional plotting specifications

Details

This function use the fitted model from nlme and lme functions in nlme package, and lmer function in lme4 package. It returns a set of plots of individual observed data, the fitted curves and the quality of fit.

Author(s)

Ken Kelley (Indiana University; KKIII@indiana.edu) and Po-Ju Wu (Indiana University; pojwu@indiana.edu)

See Also

par, nlme, lme4, lme, lmer, vit.fitted

Examples


data(Gardner.LD)
library(nlme)
grouped.Gardner.LD <- groupedData(Score ~ Trial|ID, data=Gardner.LD, order.groups=FALSE)    
G.L.nlsList<- nlsList(SSlogis,grouped.Gardner.LD)
G.L.nlme <- nlme(G.L.nlsList)

vit.fitted(G.L.nlme)
vit.fitted(G.L.nlme, pct.rand = 50)

[Package MBESS version 0.0.9 Index]