Posts

Showing posts from October, 2022

Module 9: Tabulating Tabular Data in R

Image
  Hi everyone!  This week's assignment focuses on using R to make tables from data frames. We also explore adding sum totals for both rows and columns in our contingency tables and creating proportion tables. 1. Generate simple table in R that consists of four rows: Country, age, salary and purchased. 2. Generate contingency table also know as r x c table (Chapter 7, p.135) using  mtcars  dataset. >assignment9  < -  table ( mtcars$gear, mtcars$cyl, dnn= c ("fill out here") 2.1 Add the  addmargins()  function to report on the sum totals of the rows and columns of assignment9 table >addmargins(assignment9) 2.2 Add  prop.tables()  function, and report on the proportional weight of each value in a assignment9 table 2.3 Add  margin  = 1 to the argument under  prop.table()  function, and report on the row proportions found in assignment9 table. -Ramya's POV

Module 8: Persona of ANOVA

Image
  Hi everyone!  This week we learned another form of testing, specifically for analyzing variances of a categorical variable like being male or female and if that has a true mean difference with a quantitative variable like hours spent studying for a test. This form of hypothesis testing is called ANOVA. The characteristics or persona that makes ANOVA different from a t-test for difference in means is we can have more than 2 variables with multiple categories. Let's get started! 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 Stres...

Module 7: Progression in Regression Analysis

Image
Hi everyone!  This week we are focusing on regression analysis from linear with one predictor variable to multi variable regression! Regression can be simply put as the an estimation or best fit of the relationship between two variables giving us a tool to predict the outcome of one variable based on its linear relationship to another variable. 1. In this assignment's segment, we will use the following regression equation    Y = a + bX +e Where: Y  is the value of the  Dependent variable (Y) , what is being predicted or explained a  or Alpha, a constant; equals the value of Y when the value of X=0 b  or Beta, the coefficient of X; the slope of the regression line; how much Y changes for each one-unit change in X. X  is the value of the Independent variable (X), what is predicting or explaining the value of Y e  is the error term; the error in predicting the value of Y, given the value of X  (it is not displayed in most regression eq...