Posts

Showing posts from March, 2025

Module #10 Assignment - ANOVA (analysis of variance) and Regression coefficients

Image
 3/28/25 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)) Interpretation of R results: Regression Coefficients:  The multiple linear regression model examines how age, weight, bmp (body mass proportion), and fev1 (forced expiratory volume) predict pem...

Module # 9 assignment- prop tables

Image
 3/11/25 In this assignment, you have two questions. 1. Your data.frame is > assignment_data <- data.frame( Country = c("France","Spain","Germany","Spain","Germany", "France","Spain","France","Germany","France"), age = c(44,27,30,38,40,35,52,48,45,37), salary = c(6000,5000,7000,4000,8000, 5500 ,   4500 ,   6000 ,   7500 ,   5000 ), Purchased=c("No","Yes","No","No","Yes", "Yes","No","Yes","No","Yes")) Generate simple table in R that consists of four columns: Country, age, salary and purchased. 2. Generate contingency table also known as r x c table using  mtcars  dataset i.e. data(mtcars) assignment9  < -  table ( mtcars$gear, mtcars$cyl, dnn= c ( "gears", "cylinders") 2.1 Add the  addmargins()  function to report on the sum totals of the rows and columns of ass...

Module # 8 Assignment- ANOVA test

Image
3/6/25 This week's work was both engaging and insightful. I particularly enjoyed the problems we worked on, as they were highly relevant and informative. The exercises provided a great opportunity to apply statistical concepts in a practical way, reinforcing my understanding of ANOVA tests, t-tests, and data structuring in R. Even though the ANOVA test didn’t show a significant difference, it was a good reminder that not every dataset will give clear results.  1.  A researcher is interested in the effects of drug against stress reaction. She gives a reaction time test to three different groups of subjects: one group that is under a great deal of stress, one group under a moderate amount of stress, and a third group that is under almost no stress. The subjects of the study were instructed to take the drug test during their next stress episode and to report their stress on a scale of 1 to 10 (10 being most pain). High Stress Moderate Stress Low Stress 10...