options ps=66 ls=80; data voting; if vote = 9 then vote = .; infile '/u11/faculty/tch/votesurv'; input id sex age party education income aware vote; run; title 'B. Descriptive statistics for people who voted'; proc freq; table vote; run; title 'C. Ch
MA 684 Class 6
Categorical Predictors
Interaction variables
Stepwise Regression
From last class:
Categorical Predictors
Voting Survey: Factors associated with political
awareness
Regression with categorical predictors:
Programming issues
Using standard re
Prediction Intervals and Confidence
Intervals for Predicted Values from
Multiple Linear Regression
Intervals for predicted values
Concept parallel to simple linear regression
Predicted value from a multiple regression can
be viewed in 2 ways:
Predicted
Example: Multiple regression to control for
confounding
Example: Multiple regression to control for
confounding
Example: Multiple regression to
control for confounding
Linear regression predicting sleeptime from sexfemale
Analysis of Variance
Source
DF
Su
MA684 Class 9
Logistic Regression II
Outline
Test, description of the overall model
A little theory likelihood estimation,
testing
Multiple partial tests for logistic
regression
Goodness-of-Fit for the model
Programming considerations for
logistic re
MA684 Homework from Class 2 2016
Simple Linear Regression
Material from this class is covered in Chapter 5 of KKM and N.
1. (Based on an example from the Chapter 5 exercises in KKM and N) Do better students get
better jobs? 30 recent graduates from a part
MA684 Class 11 Homework
Principal Components / Factor Analysis
(From an on-line data set from Professor James Sidanius, UCLA) The Faculty
Evaluation data set contains data on course evaluations from 400 students, covering a
number of courses and instructo
MA684 Class 11
Principal Components and Factor
Analysis II
Outline:
1. A related topic: scale development/psychometrics
Concepts of reliability and validity
Cronbachs alpha
Item analysis via PC, alpha
2. Creating subscales/factor scores
Using factor analy
MA684 Class 10 Homework Solutions
Logistic Regression II
Question 1. (No computer work necessary, other than finding p-values for chi-square
statistics) From the voting study in last weeks assignment. Last week you ran a multiple
logistic regression predi
MA684 Class 11
Principal Components and Factor
Analysis
Example:
Benefits and barriers to exercise
Two BU graduate students interested in factors
associated with:
whether or not women participate in regular exercise
what type of exercise women participate
MA684 Class 13
Analysis of longitudinal data
Example: Behavioral Intervention aimed at
improving exercise
Enroll sedentary adults
Baseline evaluation
Includes minutes/week moderate exercise
Randomize to intervention or control
Follow for 6 months
Fo
MA684 HW 5
Multiple Regression II
Question 1. Data from Prof. Bernard Rosner, Prof. of Biostatistics across town, posted
on line. The attached data set provides data on lung function for a sample of 654 kids
between the ages of 3 and 18. We are interested
MA684 Homework from Class 4
Multiple linear regression Solutions
Question 1. How well does high school GPA predict performance in college? A
university admissions office found the correlation between high school GPA and the GPA
after freshman year to be r
HW 6 R commands and output
Not part of the assignment, but to set up population-average
coding for dummy variables used in Question 1, Model B. I used
the table() commands to check on the creation of the dummy
variables.
>
> table(alcexp)
alcexp
0
1
2
184
MA684 HW from Class 5 Solutions
Linear Regression with Categorical Predictors
1. (No compter work needed) Based on a study of maternal behavior during pregnancy,
headed by Dr. Debbie Frank. Were interested in the association between maternal alcohol use
d
MA684 Homework from Class 4
Multiple linear regression
This material is covered in Chapter 8 and 9 of KKM and N. Sections 8.1 8.5 give
background information on the theory of multiple regression. Sections 8.6 and 8.7 give
more practical examples of multip
Initial Analysis
49 13:06 Monday, April 6, 2009
The REG Procedure Model: MODEL1 Dependent Variable: y Number of Observations Read Number of Observations Used Analysis of Variance Source Model Error Corrected Total Root MSE Dependent Mean Coeff Var
options ps=66 ls=70; data in; infile '/u11/faculty/tch/hw8anyproblems'; input id sex age x1 x2 x3 y; run; title 'Initial Analysis'; proc reg; model y = age sex x1 x2 x3 / scorr2; run; title 'Residual plots and residual analysis'; proc reg lineprinter
options ps=66 ls=80; data lead; infile '/u11/faculty/tch/ma684kidlead'; input id age gender lead dev; title 'Primary analysis through proc reg'; proc reg; model dev = age gender lead; run; title 'Reduced model for multiple-partial test for lead effec
options ps=66 ls=80; data rats; infile '/u11/faculty/tch/kkc15p6d'; input id drug bodywt musclewt; * dummy coding with placebo (group 1) as reference; if drug=2 then drug2=1; else drug2=0; if drug=3 then drug3=1; else drug3=0; if drug=4 then drug4=1;
options ps=66 ls=80; data in; infile '/u11/faculty/tch/kkc8p4d'; input id homrate pop income unemp; run; title 'Some background correlations'; proc corr; var id - unemp; run; title 'Question 2a - three predictor model'; proc reg; model homrate = pop
options ps=66 ls=80; data in; infile '/u11/faculty/tch/kkc5p13'; input lat weight; run; title 'Proc means for descriptive data'; proc means; var lat weight; run; title 'A plot of the data'; proc plot; plot lat*weight; run; title 'Basic Regression Out
options ps=66 ls=80; data in; infile '/u11/faculty/tch/kkc5p8'; input id sal gpa; run; title 'Proc means for descriptive data'; proc means; var id sal gpa; run; title 'A plot of the data'; proc plot; plot sal*gpa; run; title 'Basic Regression Output;
options ps=66 ls=80; data weight; infile '/u11/faculty/tch/kkc5p2d'; input person sbp quet age smk; run; title 'Proc means for descriptive data'; proc means; var person sbp quet age smk; run; title 'A plot of the data'; proc plot; plot sbp*quet; run;
MA684
1
Some Review Problems
Class
1.
Based on Problem 13, Ch. 3. The following gives weight loss (in
pounds) over a three week period for people initiating two different weightloss programs:
Diet A: 21 , 33 , 35 , 42 , 36 , 34 , 13, 39, 40
Diet B: 24 , 2
MA684 Homework from Class 2
Simple Linear Regression
Material from this class is covered in Chapter 5 of KKM and N.
1. (Based on an example from the Chapter 5 exercises in KKM and N) A study was conducted
to evaluate the relationship between driving speed
MA684
Homework from Class 3 Solutions
Read about PIs and CIs in Chapter 5 of KKM and N, and R2 and the ANOVA for the regression
in Chapter 7.
1. Some results from the regression predicting height (in inches) from femur length (in inches),
from last weeks
MA 684
Regression and Multivariate Analysis
Spring 2016
Instructor:
Recommended
Text:
Requirements:
Tim Heeren
Medical Campus: Crosstown Building, Room 309, 617 638-5177
Charles River (Monday): 64 Cummington St., Room 235
Office hours at Charles River Cam