Applied Neurobiological Imaging, Dr. Katherine L. Narr

Our Protocols « back

example CSF mixed model pmap
Mapping Random Effects in R.

Creating a mixed model

Written 4/07/09 by Owen Phillips . Email email ophillip at loni dot ucla dot edu if you have any questions.

As of now, the mixed model needs to be run using a script on

  1. Download the script here.
  2. Edit the inputs, outputs, and variables to fit your needs. Follow the protocol outlined in "Running R Statistical Analyses on MRI Data" to prepare your inputs. The main difference between the two protocols is the random factor for the "-formulay" and "-reducedy" will be in brackets. ex: (1|family_mixed)
  3. Below is a sample command line where family_mixed is our random factor. The mixed model is used when related subjects are included in the analysis. Note-This approach may reduce power.

    /ifs/woods/R/R-2.7.2/bin/R CMD BATCH --no-save --no-restore --quiet '--args -table/ifs/xxxxxx.txt -formulay~diagnosis+age+sex+BV_cubed+(1|family_mixed) -reducedy~age+sex+BV_cubed+(1|family_mixed) -output/ifs/xxxxxxxx.ucf' /ifs/woods/rshape/batch_commands/anova_mixed_shape_batch.R /ifs/xxxxxxxxx_error_log.txt
  4. To run on qsub, first ssh -X
  5. Submit on the command line using : qsub R.qsub.sample
  6. Note-effects are only shown in the positive direction.
  7. Note-the random factor variable will need to be in a string format. For example, if you are trying to covary for family, and each family is coded with a number, add a letter in front of the family ID. Example: 101 to X101, 102 to X102..ect

Valid XHTML 1.0 Transitional

© 2014 BMAP. All rights reserved.