Package OLScurve. August 29, 2016

Similar documents
Package datasets.load

Latent Curve Models. A Structural Equation Perspective WILEY- INTERSCIENÅ’ KENNETH A. BOLLEN

Package gppm. July 5, 2018

Package svalues. July 15, 2018

Package rpst. June 6, 2017

Package robotstxt. November 12, 2017

Package clipr. June 23, 2018

Package QCAtools. January 3, 2017

Package fastdummies. January 8, 2018

Package influence.sem

Package ECctmc. May 1, 2018

Package geojsonsf. R topics documented: January 11, Type Package Title GeoJSON to Simple Feature Converter Version 1.3.

Package bayesdp. July 10, 2018

Package glmnetutils. August 1, 2017

Package strat. November 23, 2016

Package lucid. August 24, 2018

Package RNAseqNet. May 16, 2017

Package modmarg. R topics documented:

Package cattonum. R topics documented: May 2, Type Package Version Title Encode Categorical Features

Package dalmatian. January 29, 2018

Package weco. May 4, 2018

Package rollply. R topics documented: August 29, Title Moving-Window Add-on for 'plyr' Version 0.5.0

Package gtrendsr. August 4, 2018

Package reval. May 26, 2015

Package optimus. March 24, 2017

Package gtrendsr. October 19, 2017

Package blocksdesign

Package CausalImpact

Package fbroc. August 29, 2016

Package vinereg. August 10, 2018

Package rfsa. R topics documented: January 10, Type Package

Package MatchIt. April 18, 2017

Package calpassapi. August 25, 2018

Package nonnest2. January 23, 2018

Package corclass. R topics documented: January 20, 2016

Package cosinor. February 19, 2015

Package fcr. March 13, 2018

Package canvasxpress

Package ParetoPosStable

Package kirby21.base

Package BiocManager. November 13, 2018

Package pairsd3. R topics documented: August 29, Title D3 Scatterplot Matrices Version 0.1.0

Package raker. October 10, 2017

Package RODBCext. July 31, 2017

Package quickreg. R topics documented:

Package Cubist. December 2, 2017

Package OutlierDC. R topics documented: February 19, 2015

Package MTLR. March 9, 2019

Package DALEX. August 6, 2018

Package geogrid. August 19, 2018

Package robets. March 6, Type Package

Package lumberjack. R topics documented: July 20, 2018

Package sure. September 19, 2017

Package mdftracks. February 6, 2017

An Introduction to Growth Curve Analysis using Structural Equation Modeling

Package PedCNV. February 19, 2015

Package lvm4net. R topics documented: August 29, Title Latent Variable Models for Networks

Package InformativeCensoring

Package PCADSC. April 19, 2017

Package geneslope. October 26, 2016

Package rereg. May 30, 2018

Package RcmdrPlugin.survival

Package messaging. May 27, 2018

Package pwrrasch. R topics documented: September 28, Type Package

Package robustreg. R topics documented: April 27, Version Date Title Robust Regression Functions

Package CuCubes. December 9, 2016

Package deductive. June 2, 2017

Package profvis. R topics documented:

Package interplot. R topics documented: June 30, 2018

Package GLMMRR. August 9, 2016

Package queuecomputer

Package simr. April 30, 2018

Package frequencyconnectedness

Package ensurer. August 29, 2016

Package svmpath. R topics documented: August 30, Title The SVM Path Algorithm Date Version Author Trevor Hastie

Package pwrab. R topics documented: June 6, Type Package Title Power Analysis for AB Testing Version 0.1.0

Package benchmarkme. R topics documented: February 26, Type Package Title Crowd Sourced System Benchmarks Version 0.2.

Package blocksdesign

Package CGP. June 12, 2018

Package bife. May 7, 2017

Package statip. July 31, 2018

Package esabcv. May 29, 2015

Package dgo. July 17, 2018

Package caretensemble

Data Management - 50%

Package edfreader. R topics documented: May 21, 2017

Package balance. October 12, 2018

Package structree. R topics documented: August 1, 2017

Package bigreadr. R topics documented: August 13, Version Date Title Read Large Text Files

Package projector. February 27, 2018

Package pmg. R topics documented: March 9, Version Title Poor Man s GUI. Author John Verzani with contributions by Yvonnick Noel

Package colf. October 9, 2017

Package catenary. May 4, 2018

Package lcc. November 16, 2018

Package mixphm. July 23, 2015

Package ridge. R topics documented: February 15, Title Ridge Regression with automatic selection of the penalty parameter. Version 2.

Package IncucyteDRC. August 29, 2016

Package C50. December 1, 2017

Package qicharts. October 7, 2014

Package BiDimRegression

Transcription:

Type Package Title OLS growth curve trajectories Version 0.2.0 Date 2014-02-20 Package OLScurve August 29, 2016 Maintainer Provides tools for more easily organizing and plotting individual ordinary least square (OLS) growth curve trajectories. Depends lattice Suggests testthat, knitr, lavaan ByteCompile yes LazyLoad yes LazyData yes Repository CRAN License GPL (>= 2) URL https://github.com/philchalmers/olscurve Collate 'OLScurve.R' 'parplot.r' 'subjplot.r' 'OLScurve-package.R' Author Phil Chalmers [cre, aut], Carrie Smith [ctb], Matthew Sigal [ctb] NeedsCompilation no Date/Publication 2014-02-20 18:27:03 R topics documented: OLScurve-package..................................... 2 gender............................................ 2 nonlin.example....................................... 2 OLScurve.......................................... 3 parplot............................................ 5 subjplot........................................... 6 1

2 nonlin.example Index 8 OLScurve-package OLS growth curve trajectories Details OLS growth curve trajectories Provides tools for organizing, calculating, and plotting ordinary least squares growth curve trajectories. These type of models are typically used to diagnose the effectiveness of a specified time functional form at the individual level rather than at the group level (where FIML estimation is required). and Carrie Smith <carrie.elizabeth@gmail.com> and Matthew Sigal <matthewsigal@gmail.com> gender of gender A vector identifying whether the repeated measure row was Male or Female for the nonlin.example dataset. nonlin.example of nonlin.example data An artificial dataset simulated by the parameters given in the vignette file for OLScurve. Arguments gender a vector identifying whether the repeated measure row was Male or Female

OLScurve 3 OLScurve Ordinary least squares growth curve trajectories The OLScurve provides a simple way of specifying ordinary least squares (OLS) growth curve models in R. Individual OLS trajectories are fit to each case and an OLScurve object is returned which can be passed to several graphical and summary function within the package. Usage OLScurve(formula, data, time = data.frame(time = 0:(ncol(data) - 1)),...) ## S3 method for class 'OLScurve' print(x, group = NULL, SE = TRUE, adjust = FALSE, digits = 3,...) ## S3 method for class 'OLScurve' plot(x, group = NULL, sep = FALSE,...) Arguments formula data a formula specifying how the functional form of time should be coded. By default time is the only predictor but can be modified to, and any typical additive R formula may be used (e.g., powers, square roots, and exponentials) a data frame in the wide (one subject per row) format containing only the time related variables. Can be of class matrix or data.frame time a data.frame object specifying the relative spacing between time points. The default is for equal spacing and this variable is name time. x group SE digits sep an OLScurve object a factor grouping variable used to partition the results logical; print a list containing the standard errors? number of digits to round logical; should the plots be separated?... additional arguments to be passed adjust logical; apply adjustment to make the variances unbiased? Only applicable for simple linear trajectories. Unadjusted valuse can be interpreted as upper bounds of the true variance parameters

4 OLScurve Details As Bollen and Curran (2006) note, there are a variety of advantages to using the case-by-case approach for estimating trajectory parameters. First of all, OLS estimation is intuitively appealing, making it a good pedagogical tool for introducing how to model trajectories, and illuminates many essential conditions and assumptions necessary for LCMs. Second, prediction of the parameters for individual trajectory estimates are calculated for each case in the sample, which can lead to several diagnostics by statistical and graphical means. Also, summary statistics can be computed for these estimates (which can also be graphically portrayed) and if need be these estimates can be analyzed further by other statistical frameworks. Unfortunately there are also several limitation to OLS estimation for LCMs, namely: overall tests of fit are not readily available, the structure of the error variances must be unrealistically constrained to estimate a pooled standard error, the latent factors cannot be regressed without error on other exogenous or time-varying variables, and analytic significance tests are often not readily available (Bollen & Curran, 2006). However, OLS estimation may still be useful in the preliminary stages of latent curve modeling for (a) selecting appropriate functional forms of growth, (b) examining unconditional population homogeneity, (c) observing whether the relationship between growth factors are linear, and for (d) detecting influential outliers (Carrig et al., 2004). References Bollen, K. A. & Curran, P. J. (2006). Latent Curve Models: A Structural Equation Perspective. John Wiley & Sons. Carrig, M. M., Wirth, R. J., & Curran, P. J. (2004). A SAS Macro for Estimating and Visualizing Individual Growth Curves. Structural Equation Modeling, 11, 132-149. See Also parplot, subjplot Examples ## Not run: ##linear data <- t(t(matrix(rnorm(1000),200)) + 1:5) mod1 <- OLScurve(~ time, data = data) mod1 #unadjusted variances print(mod1, adjust = TRUE) #adjusted plot(mod1) ##quadratic data <- t(t(matrix(rnorm(1000),200)) + (0:4)^2) mod2 <- OLScurve(~ time + I(time^2), data = data) mod2 plot(mod2)

parplot 5 ##sqrt data <- t(t(matrix(rnorm(1000),200)) + 20*sqrt(5:1)) mod3 <- OLScurve(~ sqrt(time), data = data) mod3 plot(mod3) ##exponential data <- t(t(matrix(rnorm(1000,0,5),200)) + exp(0:4)) mod4 <- OLScurve(~ exp(time), data = data) mod4 plot(mod4) ##combination data <- t(t(matrix(rnorm(1000),200)) + 20*sqrt(1:5)) mod5 <- OLScurve(~ time + sqrt(time), data = data) mod5 plot(mod5) ##piecewise (global linear trend with linear shift at time point 3) data <- t(t(matrix(rnorm(1000),200)) + (0:4)^2) time <- data.frame(time1 = c(0,1,2,3,4), time2 = c(0,0,0,1,2)) mod6 <- OLScurve(~ time1 + time2, data, time=time) mod6 plot(mod6) ##two group analysis with linear trajectories data1 <- t(t(matrix(rnorm(500),100)) + 1:5) data2 <- t(t(matrix(rnorm(500),100)) + 9:5) data <- rbind(data1,data2) group <- c(rep('male',100),rep('female',100)) mod <- OLScurve(~ time, data) print(mod,group) plot(mod,group) ## End(Not run) parplot Plot distribution of parameters Usage A plotting function for displaying the distribution of the OLS parameter estimates. parplot(object,...) ## S3 method for class 'OLScurve' parplot(object, type = "hist", group = NULL, breaks = NULL, prompt = TRUE,...)

6 subjplot Arguments object type group breaks prompt an object of class OLScurve type of plot to display; can be 'hist', 'boxplot', or 'splom' for a histogram, boxplot, or scatter plot matrix a factor grouping variable used to partition the results number of breaks to be used in plotting the histogram a logical variable indicating whether devasknewpage(ask=true) should be called... additional arguments to be passed Examples ## Not run: data <- t(t(matrix(rnorm(1000),200)) + 1:5) group <- rep(c('male', 'Female'), each=nrow(data)/2) mod <- OLScurve(~ time, data = data) parplot(mod) parplot(mod, type = 'boxplot') parplot(mod, type = 'splom') parplot(mod, group=group) parplot(mod, type='boxplot', group=group) parplot(mod, type='splom', group=group) ## End(Not run) subjplot Plot individually estimated parameters A plotting function for displaying the individuals trajectories and their modelled functional form. Useful for detecting aberrant individual trajectories. Usage subjplot(object,...) ## S3 method for class 'OLScurve' subjplot(object, layout = NULL, prompt = TRUE,...)

subjplot 7 Arguments object layout prompt an object of class OLScurve a variable to be passed to xyplot to adjust the graphical layout a logical variable indicating whether devasknewpage(ask=true) should be called... additional arguments to be passed Examples ## Not run: data <- t(t(matrix(rnorm(1000),200)) + 1:5) mod <- OLScurve(~ time, data = data) subjplot(mod) ##quadratic data <- t(t(matrix(rnorm(1000),200)) + (0:4)^2) mod2 <- OLScurve(~ time + I(time^2), data = data) subjplot(mod2) ## End(Not run)

Index Topic OLS, OLScurve, 3 parplot, 5 subjplot, 6 Topic datasets gender, 2 nonlin.example, 2 Topic data gender, 2 nonlin.example, 2 Topic growth OLScurve, 3 parplot, 5 subjplot, 6 Topic package OLScurve-package, 2 gender, 2 nonlin.example, 2 OLScurve, 3 OLScurve-package, 2 parplot, 4, 5 plot.olscurve (OLScurve), 3 print.olscurve (OLScurve), 3 subjplot, 4, 6 8