paperKB
coga / coga-kb
Processing
Help
Sign in

Chunk #15 — Methods — Data analyses

Source
Performance of the Self-Report of the Effects of Alcohol Questionnaire Across Sexes and Generations.
Embedded
yes

Text

The following approach for Tables 3 and 4 used a modified bootstrap procedure without replacement in R (R Core Team, 2013). In this approach the procedure was the same whether the analyses required separating data for sex of parents, sex of offspring or when combining both sexes within parents or offspring. Here, subjects were first grouped by family, after which a subset of data was generated based on the desired family members (e.g., fathers and sons) and the relevant variable (e.g., SRE-5). Two samples were then generated by using the sample _n function from the dplyr library in R (Wickham et al., 2018), which selected a target parent and a random offspring or randomly selected pairs of offspring. Then, Pearson Product Moment correlations were run with rcorr (Harrell, 2018). The sampling and correlations were done 1000 times. Finally, using the fisherz2r function for Fisher Z transformations (Revell, 2018), an average Pearson Product Moment correlation was computed. Analyses were done using the Statistical Package for the Social Sciences (SPSS Inc, 2009) and R (R Core Team, 2013).