The purpose of this project is to revisit observational data collected in rural Taiwan in the 1950s by Arthur Wolf and employ a multilevel multinomial model in addition to traditional anthropological analysis to reveal the patterns of proactive behaviors of young kids.
We run four models,
- model_i: a multinomial model with only individual random effects from initiator and recipient.
- model_iF: a multinomial model with individual random effects from initiator and recipient, as well as fixed effects from covariates (age at observation, gender, whether the initiator and recipient were in the same household).
- model_ih: a multinomial model with both individual and household random effects from initiator and recipient.
- model_ihF: a multinomial model with both individual and household random effects from initiator and recipient, as well as fixed effects from covariates (age at observation, gender, whether the initiator and recipient were in the same household).
proactive_behaviors.RData
: a pre-processed dataframe of the proactive behavioral data. All children recorded in this dataframe aged 0 to 12 at the end of the field study.proactive-multinomial-model-data.csv
: a file containing all processed variables required to run the multinomial analysis, which is processed fromproactive_behaviors.RData
.
run_multinomial.R
: the code required to run the multinomial analysis.results_analysis_newest.R
: the code required to analyze the results from fitting the models. Figures and tables shown in the manuscript are created using this R file.descriptive_statistics.R
: the code required to do descriptive analysis and create figures.sensitivity_prior.R
: the code required to do sensitivity analysis of the priors.
- Files ends with
*_corr.csv
: contains the correlation between the random effects (rows starting with "Rho"). - Files ends with
*_random_effect.csv
: contains the variance of the random effects (rows starting with "sigma") and the intercepts (rows starting with "a"). WAIC.csv
: contains the WAIC values for four models.- In the subfolder
figures
:
- Figures starts with
heatmap
are the heatmaps for the correlation between individual random effect across different behaviors. - Figures starts with
predicted
are the predicted probabilities of different behaviors at different values of covariate as specified in the filenames.
- In the subfolder
table
:
- Files ends with
*_corr.csv
are the correlation matrices between individual random effects of four models.
To run the analysis, you can use the code provided in the code
folder. The results can be analyzed using the results_analysis_newest.R
file.