kxgao / scalable-crossed-mixed-effects

Scalable estimation for crossed mixed models
MIT License
6 stars 2 forks source link

Data format #2

Open beth-phipps opened 2 years ago

beth-phipps commented 2 years ago

Hey I have been looking through the work you have done in this repo (really interesting by the way!) and am trying to use the scripts. Just wondering if you had an example of the data format needed for mixed.py script. I have read through the readme but am not quite sure. I have a numeric response variable, a fixed effect (factor) and two random intercepts (factor/categorical) and wasn't sure how to set it up. Particularly the last column for the predictors where you say 'be sure to include a '1' if an intercept is desired', I am unclear on what format this column is in. If you had a basic example of what the filename.txt file should look like that would be great. Thank you so much for your time!

kxgao commented 2 years ago

Each predictor should have its own column. In your example of one fixed effect (predictor) and two random effects, each line should have the order

First random effect; Second random effect; Response; Fixed effect; Intercept

The final intercept column is only needed if you have an intercept in your model, and if so it should just be a column of ones.

Thanks for your interest in the work!