-
Notifications
You must be signed in to change notification settings - Fork 4
/
lesson_12_SimpleRegANOVA.Rmd
34 lines (21 loc) · 2.67 KB
/
lesson_12_SimpleRegANOVA.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
---
title: 'Lesson 12: Simple Regression and ANOVA'
---
## Lesson 12: Simple Regression and ANOVA
For this lesson we will be working with the HELP dataset. See more details on the HELP dataset at:
* [https://github.com/melindahiggins2000/N736Fall2017_HELPdataset](https://github.com/melindahiggins2000/N736Fall2017_HELPdataset)
* [https://melindahiggins2000.github.io/N736Fall2017_HELPdataset/](https://melindahiggins2000.github.io/N736Fall2017_HELPdataset/)
## Variables in HELP
_{remember to review the HELP documentation}_
OUTCOME - For today's exercise, we will focus on the total score from the "Inventory of Drug Use Consequences", which is variable `indtot`.
Learn more about this survey tool at:
* [http://lib.adai.washington.edu/dbtw-wpd/exec/dbtwpub.dll?BU=http%3A//lib.adai.washington.edu/instrumentsearch.htm&TN=Instruments&CS=0&QY=find%20(AccessNo%20ct%20143)&RF=Full&DF=Full&MR=&NP=3&RL=0&DL=0&XC=&ID=&AC=QBE_QUERY](http://lib.adai.washington.edu/dbtw-wpd/exec/dbtwpub.dll?BU=http%3A//lib.adai.washington.edu/instrumentsearch.htm&TN=Instruments&CS=0&QY=find%20(AccessNo%20ct%20143)&RF=Full&DF=Full&MR=&NP=3&RL=0&DL=0&XC=&ID=&AC=QBE_QUERY)
CONTINUOUS "predictor" - for the simple linear regression we will use the CESD (depression) score, variable `cesd`.
GROUP/"Factor" - for the one-way ANOVA we will create 3 groups (low, moderate and high) from the PSS-fr (perceived social support from friends scale) using "cutpoints" defined by thirds (33rd and 67th percentiles), variable `pss_fr`.
## Data and Code for Today
* HELP Dataset for R and SPSS [https://github.com/melindahiggins2000/N736Fall2017_lesson12/raw/master/helpmkh.sav](https://github.com/melindahiggins2000/N736Fall2017_lesson12/raw/master/helpmkh.sav)
* HELP Dataset for SAS [https://github.com/melindahiggins2000/N736Fall2017_lesson12/raw/master/helpmkh.sas7bdat](https://github.com/melindahiggins2000/N736Fall2017_lesson12/raw/master/helpmkh.sas7bdat)
* HELP Formats for SAS [https://github.com/melindahiggins2000/N736Fall2017_lesson12/raw/master/formats.sas7bcat](https://github.com/melindahiggins2000/N736Fall2017_lesson12/raw/master/formats.sas7bcat)
* R Program [https://github.com/melindahiggins2000/N736Fall2017_lesson12/raw/master/lesson12.R](https://github.com/melindahiggins2000/N736Fall2017_lesson12/raw/master/lesson12.R)
* SAS Program [https://github.com/melindahiggins2000/N736Fall2017_lesson12/raw/master/lesson12all.sas](https://github.com/melindahiggins2000/N736Fall2017_lesson12/raw/master/lesson12all.sas)
* SPSS Program (Syntax) [https://github.com/melindahiggins2000/N736Fall2017_lesson12/raw/master/Lesson_12_SPSSSyntax.sps](https://github.com/melindahiggins2000/N736Fall2017_lesson12/raw/master/Lesson_12_SPSSSyntax.sps)