Spida

From Wiki1

Jump to: navigation, search

This page describes the 'spida' package in R. See also the p3d package.

The 'spida' package is a collection of utility functions for mixed models initially developed for SPIDA 2009 and updated since then.

The currently available version of the spida package has been compiled with R-3.0.0

Contents

Installation

The current version called 'spida2' in maintained on Github and is easily installed with:

 install.packages('devtools') 
 devtools::install_github('gmonette/spida2')

You should also install some packages that are used by some functions in spida2:

 install.packages(c('car','Hmisc','magrittr','latticeExtra'))

In each R session in which you wish to use 'spida2', load the package with the R command:

 library(spida2)

Overview

The major functions are:

wald
Wald test with functions to easily generate hypothesis matrices to estimate linear combinations of linear parameters of model fitted with lm, lme, lmer, etc. Methods are easily created for other fitting methods
gsp
general spline generator with any degree and smoothness with additional function 'sc' to contruct hypotheses, smsp - easy smoothing splines with lme and nlme
capply, cvar, dvar, up, tolong, towide, agg
easy manipulation of hierarchical data sets: create contextual variables, summarize, transform, merge, etc.

Data sets

The following data sets and descriptions are available directly in R after installing and loading the 'spida' or 'spida.beta' packages. Access to .csv versions is provided here for anyone who would like to access them without using R.

Directory of .csv. files

Descriptions of data sets

  • Drugs: Longitudinal study of schizophrenia symptoms with non-randomized treatment
    Normal response with complete data at the same 6 times points. Time-varying treatment.
  • hsfull, hs, hs1, hs2: Math achievement and ses in a sample of 160 U.S. schools from the 1982 study “High School and Beyond”. hs, hs1 and hs2 are subsamples
    Normal response with hierarchical model. 'ses' is a level 1 variable with potential contextual effects
  • iq: Longitudinal study of IQ after traumatic brain injuries
    Normal response, collected at highly unbalanced times, illustrating a non-linear model for recovery trajectories
  • Indonesia: Respiratory infections among Indonesian children. Longitudinal observational study with no treatment
    Dichotomous response, unbalanced with two time variables: date and age.
  • migraines: Effectiveness of migraine treatment
    Dichotomous response, unbalanced with common onset of treatment, possible seasonal effects and non-linear response curves
  • Orthodont:Growth curve data on an orthdontic measurement
    Classical repeated measures balanced data set

Links

Personal tools