Skip to content

Instantly share code, notes, and snippets.

View z458r456's full-sized avatar

Zachary Roman z458r456

View GitHub Profile
@mike-lawrence
mike-lawrence / cfa.stan
Created March 21, 2017 15:10
Demo using Stan for Confirmatory Factor Analysis
data{
# n_subj: number of subjects
int n_subj ;
# n_y: number of outcomes
int n_y ;
# y: matrix of outcomes
matrix[n_subj,n_y] y ;
# n_fac: number of latent factors
int n_fac ;
# y_fac: list of which factor is associated with each outcome