Module #10 Assignment

 Module #10 Assignment 


This is from the Multiple Linear Regression chapter 11 of "Introductory Statistics with R", pg. 185-194 

I revised this question, so please follow my description only. Conduct ANOVA (analysis of variance) and Regression coefficients to the data from cystfibr : data (" cystfibr ") database. Note that the dataset is part of the ISwR package in R. 

You can choose any variable you like. in your report, you need to state the result of Coefficients (intercept) to any variables you like both under ANOVA and multivariate analysis. I am specifically looking at your interpretation of R results. 



Extra clue:
The model code:
i. lm(formula = cystfiber$spemax ~ age + weight + bmp + fev1, data=cystfiber)
ii. anova(lm(cystfibr$spemax ~ age + weight + bmp + fev1, data=cystfiber))




First we have to load in the dataset "cystfibr"






CODE and OUTPUT :

Interpretation of Coefficients (Regression Analysis):

Intercept: The intercept coefficient represents the expected value of pemax when all predictor variables—age, weight, BMP (body mass percentile), and FEV1 (forced expiratory volume)—are zero. This value provides a baseline level for pemax in the absence of other influencing factors. For example, if the intercept is 10, it suggests that, hypothetically, when all predictors are zero, the expected pemax value would be 10. Although having all predictors at zero may not be realistic in a practical context, the intercept offers a reference point for understanding the impact of each predictor on pemax.


Coefficients of other variables (age, weight, bmp, fev1): Each coefficient shows how much pemax is expected to change with a one-unit increase in that predictor, assuming the other variables stay the same. For example, the age coefficient tells us how pemax would change with each additional year, given that weight, BMP, and FEV1 don’t change. This highlights the effect each predictor has on pemax individually.


The code output tells us the intercept is 179.296. This is the predicted value of pemax. This is also known as the maximum expiratory pressure when age, weight, bmp, and fev1 equal zero. The coefficients for the other variables highlight how the expected value of pemax is impacted with each respective unite of a variable. For every year of age, pemax will reduce by 3.418, increase by 2.688 weight , and decrease bmp by 2.066.







ANOVA


CODE:


OUTPUT:


Interpretation of ANOVA Results:


The values in ANOVA table include = 


Sum of Squares: Shows the amount of variation in pemax that each predictor accounts for. Higher values indicate that the predictor explains a larger portion of the variation.


Mean Square: This is the Sum of Squares divided by the degrees of freedom for each predictor, used to calculate the F-value.


F-value: Measures how strongly each predictor is associated with changes in pemax. A larger F-value suggests that the predictor has a stronger impact on pemax.


p-value: Indicates whether the predictor's effect on pemax is statistically significant. Typically, a p-value below 0.05 suggests that the predictor has a significant effect on pemax.


From the results of the ANOVA, we see that the p value for age and fev1 are smaller than 0.05 meaning they are both significant predictors of pemax. This means we can successfully reject the null hypothesis. However, the p values for weight and bmp are greater than 0.05 which means they are not significant predictors of pemax so we fail to reject the null hypothesis. 


Summary: 

Through this analysis, I gained insight into using ANOVA and multiple linear regression to understand relationships between variables in a dataset. By applying these methods to the cystfibr dataset, I learned how each predictor—age, weight, BMP, and FEV1—individually impacts the pemax. The regression coefficients showed the effect of each variable on the pemax when others were held constant, helping to isolate each variable's influence. Overall, this exercise helped solidify my understanding of regression analysis and ANOVA as tools for drawing meaningful insights from data.




Comments

Popular posts from this blog

Module #12 Assignment