all articles

Tests for Proportions & Logistic Regression

# Install and load libraries. library(xlsx) ## Loading required package: rJava ## Loading required package: xlsxjars library(plyr) # Import data from 'homework5data.xlsx' using xlsx function. pain.data <- read.xlsx("pain.xlsx", sheetName = "pain", header = TRUE) head(pain.data) ; tail(pain.data) ## Treatment Age Severe Pain ## 1 New Treatment 29 1 1 ## 2 New Treatment 39 0 0 ## 3 New Treatment 43 0 0 ## 4 New Treatment 27 0 1 ## 5 New Treatment 16 1 1 ## 6 New Treatment 39 0 0 ## Treatment Age Severe Pain ## 195 Placebo 57 0 0 ## 196 Placebo 66 1 0 ## 197 Placebo 56 0 0 ## 198 Placebo 50 0 0 ## 199 Placebo 39 0 1 ## 200 Placebo 49 0 0 # View summary of pain. Read more…

Analysis of Variance

# Install and load libraries. library(xlsx) ## Loading required package: rJava ## Loading required package: xlsxjars library(plyr) # Import data from 'homework5data.xlsx' using xlsx function. iq.data <- read.xlsx("homework5data.xlsx", sheetName = "Sheet1", header = TRUE) # View summary of iq.data. summary(iq.data) ## group iq age ## Chemistry student:15 Min. :20.00 Min. :14.00 ## Maths student :15 1st Qu.:36.00 1st Qu.:17.00 ## Physics student :15 Median :40.00 Median :18.00 ## Mean :39.96 Mean :26. Read more…

Regression Diagnostics & Multiple Linear Regression

# Install and load libraries. library(xlsx) ## Loading required package: rJava ## Loading required package: xlsxjars library(ggplot2) library(car) ## Warning: package 'car' was built under R version 3.4.4 ## Loading required package: carData ## Warning: package 'carData' was built under R version 3.4.4 # Question 1 # Import the data from the Excel file containing data in Assignment 4. occupation.prestige <- read.xlsx("homework4data.xlsx", sheetName = "Sheet1", header = TRUE) colnames(occupation.prestige) <- c("Title", "Education", "Income", "Percent_of_Women", "Prestige_Score") head(occupation. Read more…

Correlation & Simple Linear Regression

# Install and load libraries. library(xlsx) ## Loading required package: rJava ## Loading required package: xlsxjars # Question 1 # Save the data to Excel and import into R. data <- read.xlsx("homework3data.xlsx", sheetName = "Sheet1") ; data ## height selfesteem ## 1 68 4.1 ## 2 71 4.6 ## 3 62 3.8 ## 4 75 4.4 ## 5 58 3.2 ## 6 60 3.1 ## 7 67 3.8 ## 8 68 4. Read more…

Statistical Inference & Tests for Means

# Install and load libraries. library(xlsx) ## Loading required package: rJava ## Loading required package: xlsxjars library(ggplot2) # Question 1 # Load Daphne Island data. daphne.island <- read.xlsx("Homework 2 Data.xlsx", 1, header = FALSE) daphne.island ## X1 X2 X3 X4 X5 ## 1 8.65 10.61 10.89 8.42 9.73 ## 2 9.05 8.94 11.29 9.52 8.47 ## 3 10.52 10.25 9.55 8.62 9.68 ## 4 8.89 10.25 9.24 11.53 9.59 ## 5 8. Read more…

Describing & Interpreting Data

library(xlsx) ## Loading required package: rJava ## Loading required package: xlsxjars library(ggplot2) # Question 1 # Import the data in the assignment from Excel. hospital.data <- read.xlsx("homework1data.xlsx", 1) ; hospital.data ## X7 X3 X5 X3.1 X1 X5.1 X10 X3.2 X4 X4.1 ## 1 7 5 8 3 4 1 15 4 5 8 ## 2 5 3 2 3 5 9 4 5 6 9 ## 3 5 3 6 3 2 6 4 5 5 4 ## 4 5 8 4 6 13 4 6 3 2 3 ## 5 2 4 6 6 6 8 6 3 4 4 ## 6 5 10 4 6 3 9 3 9 4 7 ## 7 10 14 4 6 5 10 4 4 9 4 ## 8 4 3 6 8 5 7 6 1 3 12 ## 9 11 5 2 1 4 4 5 6 4 2 # Flatten the hospital. Read more…
1