Module 10 Assignment
Here is the code used to conduct ANOVA and regression analysis on the "cystfibr" and "secher" datasets in R Studio: # Load necessary libraries library(datasets) # Load the cystfibr dataset data("cystfibr") # Fit a linear model to the data model_cystfibr <- lm(spemax ~ age + weight + bmp + fev1, data=cystfibr) # Display the summary of the model summary(model_cystfibr) # Conduct ANOVA on the model anova(model_cystfibr) # Load the secher dataset data("secher") # Log-transform birth weight and abdominal diameter secher$log_bwt <- log(secher$bwt) secher$log_ad <- log(secher$ad) # Fit a linear model to the data model_secher <- lm(log_bwt ~ log_ad, data=secher) # Display the summary of the model summary(model_secher) In the cystfibr dataset, we’re fitting a linear model where spemax is predicted by age, weight, bmp, and fev1. The coefficients of these variables in the model represent their respective effects on spemax. The intercept is the e...