vit                  package:MBESS                  R Documentation

_V_i_s_u_a_l_i_z_e _i_n_d_i_v_i_d_u_a_l _t_r_a_j_e_c_t_o_r_i_e_s

_D_e_s_c_r_i_p_t_i_o_n:

     A function to help visualize individual trajectories in a
     longitudinal (i.e., analysis of change) context.

_U_s_a_g_e:

     vit(id = "", occasion = "", score = "", Data = NULL, group = NULL, 
     subset.ids = NULL, pct.rand = NULL, number.rand = NULL, 
     All.in.One = TRUE, ylab = NULL, xlab = NULL, same.scales = TRUE, 
     plot.points = TRUE, save.pdf = FALSE, save.eps = FALSE,
      save.jpg = FALSE, file = "", layout = c(3, 3), col = NULL, 
      pch = 16, cex = 0.7, ...)

_A_r_g_u_m_e_n_t_s:

      id: string variable of the column name of id 

occasion: string variable of the column name of time variable 

   score: string variable of the column name where the score (i.e.,
          dependent variable) is located 

    Data: data set with named column variables (see above) 

   group: if plotting parameters should be conditional on group
          membership 

subset.ids: id values for a selected subset of individuals 

pct.rand: percentage of random trajectories to be plotted 

number.rand: number of random trajectories to be plotted 

All.in.One: should trajectories be in a single or multiple plots 

    ylab: label for the ordinate (i.e., y-axis; see par) 

    xlab: label for the abscissa (i.e., x-axis; see par) 

same.scales: should the y-axes have the same scales 

plot.points: should the points be plotted 

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 

  layout: define the per-page layout when All.in.One==FALSE 

     col: color(s) of the line(s) and points 

     pch: plotting character(s); see par 

     cex: size of the points (1 is the R default; see par) 

     ...: optional plotting specifications 

_D_e_t_a_i_l_s:

     This function makes visualizing individual trajectories simple. 
     Data should be in the "univariate format" (i.e., the same format
     as lmer and nlme data.)

_V_a_l_u_e:

     Returns a plot of individual trajectories with the specifications
     provided.

_A_u_t_h_o_r(_s):

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

_S_e_e _A_l_s_o:

     par, nlme, vit.fitted,

_E_x_a_m_p_l_e_s:

     data(Gardner.LD)

     # Although many options are possible, a simple call to
     # 'vit' is of the form:
     vit(id="ID", occasion= "Trial", score= "Score", Data=Gardner.LD)

     # Now color is conditional on group membership.
     vit(id="ID", occasion= "Trial", score="Score", Data=Gardner.LD, 
     group="Group")

     # Now randomly selects 50
     vit(id="ID", occasion= "Trial", score="Score", Data=Gardner.LD, 
     pct.rand=50, group="Group")

     # Specified individuals are plotted (by group)
     vit(id="ID", occasion= "Trial", score="Score", Data=Gardner.LD, 
     subset.ids=c(1, 4, 8, 13, 17, 21), group="Group")

     # Now colors for groups are changed .
     vit(id="ID", occasion= "Trial", score="Score", Data=Gardner.LD, 
     group="Group",subset.ids=c(1, 4, 8, 13, 17, 21), col=c("Green", "Blue"))

     # Now each individual specified is plotted seperately.
     vit(id="ID", occasion= "Trial", score="Score", Data=Gardner.LD, 
     group="Group",subset.ids=c(1, 4, 8, 13, 17, 21), col=c("Green", "Blue"),
     All.in.One=FALSE)

