DOC PREVIEW
UCLA STATS 101A - Stats 101A hw 6

This preview shows page 1-2 out of 6 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 6 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 6 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 6 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Brittany Oliva UID 003933164 Stats 101A HW6 Section 2A Part 1: Using the UCLA stress echo data set (posted on week 8 of CCLE). Using R, conduct two-way ANOVA using maxhr as the outcome variable, gender with diagnosis as the independent variables. Include your output. model1 <- aov(maxhr ~ gender + newPTCA + gender:newPTCA, data = data1) summary(model1) Df Sum Sq Mean Sq F value Pr(>F) gender 1 21 21.3 0.045 0.8324 newPTCA 1 3048 3047.7 6.429 0.0115 * gender:newPTCA 1 1632 1631.9 3.443 0.0641 . Residuals 554 262617 474.0 Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 a) State the null and the alternative hypotheses within context. H01: Gender has no effect on maxhr. H02: Being diagnosed with PTCA has no effect on maxhr. H03: Being diagnosed with PTCA has a similar affect on both genders. Ha1: Gender does have an effect on maxhr. Ha2: Being diagnosed with PTCA does have effect on maxhr. Ha3: Being diagnosed with PTCA has different affects on both genders. b) Based on the R output decide which hypotheses you reject and which ones you fail to reject. Interpret the results within context. I would reject H02 because PTCA is a significant predictor of maxhr (the p-value is .01), showing that those with or without PTCA have an affected maxhr. I would fail to reject H01 because the p-value is a high .83 which tells us that gender is not a significant predictor of max hr. From this we can conclude both genders have similar maxhr. I would fail to reject H03 because it seems there is not a significant interaction between PTCA and gender. I believe the affect of PTCA on maxhr is similar for both genders. c) Using R, create table of means and the plot of interaction effect between gender and diagnosis. Interpret your conclusions regarding the interaction effect within context. TABLE OF MEANS PTCA: yes PTCA: no Column mean Gender: Female 119.7 115.4 117.6 Gender: Male 120.2 99.6 109.8 Row mean 119.9 107.5 113.7There is somewhat an interaction in this plot as we can see from the lines touching/crossing one another (thus implying an interaction). On the other hand the ANOVA does not reflect an interaction. Conclusion: Diagnoses of PTCA does have a significant effect on maxhr, as seen by the table and box-plot, and the affects are similar within each gender (meaning both genders with PTCA have a similar maxhr). The graph shows the differences in average maxhr for each gender with and without PTCA (with PTCA having close averages), but the table shoes a p value of .06 which means the interaction between the variables is not significant. d) Conduct the same analyses using regression. Compare and contrast the results of regression and ANOVA. Call: lm(formula = maxhr ~ gender + newPTCA + gender:newPTCA, data = d) Residuals: Min 1Q Median 3Q Max -62.153 -14.730 0.847 13.270 80.270 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 119.7298 1.2133 98.679 <2e-16 *** newPTCA -4.2923 5.5767 -0.770 0.4418 gendermale 0.4233 1.9340 0.219 0.8268 newPTCA:gender -16.2244 8.7443 -1.855 0.0641 . Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 Residual standard error: 21.77 on 554 degrees of freedom Multiple R-squared: 0.01759, Adjusted R-squared: 0.01227 F-statistic: 3.306 on 3 and 554 DF, p-value: 0.02 * P-value for gender:newPTCA is .06 which leads us to fail to reject it. Thus it seems there is no interaction between gender and newPTCA because the covariate predictors aren’t valid.e) Interpret R2 resulting from regression analyses within the context of the study. Our regression gives an R2 of 0.01759 which means that about 1.76% of the variance in maxhr can be explained by gender and newPTCA. Part 2: Using the stress echo data set posted earlier CCLE conduct an ANCOVA (Analysis of Covariances) and answer the following questions. a) Using maximum heart rate as the outcome variable, base heart rate as the covariate, and ecg as the predictor, conduct ANOVA. Report both outputs. m2 : Predicting maxhr from just ecg summary(m2) Call: lm(formula = maxhr ~ ecg, data = data1) Residuals: Min 1Q Median 3Q Max -59.399 -13.850 0.601 14.150 78.150 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 121.850 1.388 87.786 <2e-16 *** ecgnormal -4.451 1.859 -2.394 0.017 * Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 Residual standard error: 21.81 on 556 degrees of freedom Multiple R-squared: 0.0102, Adjusted R-squared: 0.008425 F-statistic: 5.732 on 1 and 556 DF, p-value: 0.01699 -------------------------------------------------------------------------------------- m3: Predicting maxhr from ecg, bhr, and the interaction of the two summary(m3) Call: lm(formula = maxhr ~ ecg + bhr + ecg:bhr, data = data1) Residuals: Min 1Q Median 3Q Max -53.819 -13.744 -0.717 12.692 61.998 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 68.67991 5.80947 11.822 <2e-16 *** ecgnormal -5.36195 8.00277 -0.670 0.503 bhr 0.69920 0.07474 9.355 <2e-16 *** ecgnormal:bhr 0.02486 0.10398 0.239 0.811 Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 Residual standard error: 18.89 on 554 degrees of freedom Multiple R-squared: 0.2608, Adjusted R-squared: 0.2568 F-statistic: 65.17 on 3 and 554 DF, p-value: < 2.2e-16The two models: 1. Normal ecg : maxhr = (68.67991 + -5.36195) + (0.69920 + 0.02486)*bhr 2. Equivocal ecg: maxhr = 68.67991 + 0.69920* bhr Analysis of


View Full Document

UCLA STATS 101A - Stats 101A hw 6

Documents in this Course
Load more
Download Stats 101A hw 6
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Stats 101A hw 6 and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Stats 101A hw 6 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?