class: center, middle, inverse, title-slide .title[ # Exercises R Data Analysis ] .subtitle[ ## Elements of R e R Markdown ] .author[ ### Claudio Zandonella ] --- class: size-small # Attachment Study .pull-left-50[ #### Study Description In this study we collected data on children from III and IV grade. We to evaluate the relation between: - Mother attachment - Social-economic status - Externalizing and interanlizing prblems #### Downlad Data Download data at [**link**](https://github.com/arca-dpss/course-R-Rmarkdown/raw/main/data/data-attachment.xlsx). ] .pull-right-50[ #### Variables - `id` - children id - `escludere` - subjects that we need to exclude from the analysis (1 = exclude; 0= include) - `raccolta` - data were collected in two different times (1 = time A; 2 = time B ) - `consenso` - subjects that received parents' consensus (1 = yes; 0 = no) - `presenza` - subjects that were present at the data collection (1 = yes; 0 = no) - `classe` - subjects' school grade (III and IV grade) - `genere` - subjects' gender (0 = M; 1 = F) - `mesi` - subjects' age in months - `fas*` (from 1 to 4) - items social-economic status questionnaire - `ssm*` (from 1 to 15) - items mother Security Scale - `sdq*` (from 1 to 25) - items Strength & Difficulties questionnaire ] --- class: size-small # Tasks .pull-left-50[ #### Data Munging 1. Code variables to correct type 1. Select Data without missing data 1. Select only subjects with parents' consensus and that can be included in the analysis #### Questionnaires Scores .color-red[**FAS**], total score as the sum of 4 items: - item 1: 0-1 - item 2: 0-1-2 - item 3: 0-1-2-3 - item 4: 0-1-2-3 > Watch out: In the second collection items are coded wrong. ] .pull-right-50[ .color-red[**SSM**], total score as the mean of 15 items: - item *: 1-2-3-4 > Watch out: Items 1, 3, 4, 9, 10, 13, 15 have reverted scores .color-red[**SDQ**], total score as the sum of scale items: - item *: 0-1-2 > Watch out: Items 7,11,14,21,25 have reverted scores - Items Externalizing: 2,5,7,10,12,15,18,21,22,25 - Items Internalizing: 3,6,8,11,13,14,16,19,23,24 ] --- class: size-small # Tasks .pull-left-50[ ### Descriptive Statistics .color-red[**Categrical variables**] - Get frequency table for `genere` - Get frequency table for `classe` - Get frequency table for `genere` and `genere` .color-red[**Continuous variables**] - Compute summary statistics - Compute summary statistics for each study group .color-red[**Plots**] - Create appropriate graphical representations ] .pull-right-50[ ### Inferential Statistics <br> Evaluate the relation between mother attachment, social-economic status, class and gender with: - Externalizing Problems - Internalizing Problems ] --- class: end, middle, center # Thanks!