Posts

LIS 4317 Module #2 Assignment

Image
For this assignment, I was told I needed to find a dataset, and apply it on Tableau to a map, and describe what could make this map more communicative.  The dataset I used was a list of all of the Major League Baseball (MLB) fields across the United States and their locations, and as you can tell, most of the baseball fields are located in the northeast portion of the United States.  The list of things I would've added to this map for clarity would have been: Add a clear legend to explain what the black dots represent (MLB stadiums). This helps ensure the viewer immediately understands the data. Include city names or stadium names near the points to make it easier to identify the locations at a glance. Use colors to categorize stadiums by league (e.g., American League vs. National League). Points: Use distinctive icons or color-coded points. Lines: Add subtle lines for grouping or connectivity. Circles: Use varying circle sizes to represent data like stadium capaci...

LIS 4273 Final Project

Image
Hypothesis  - Null Hypothesis (H₀): There is no significant difference in math scores among the three program types. - Alternative Hypothesis (H₁): According to the hypothesis, the Academic program type impacts students' academic achievement, especially their math scores. Compared to general or vocational programs, which concentrate on general education or career-specific skills, educational programs offer more demanding courses and resources. It is predicted that kids in academic programs will score higher on math tests due to this distinction. Research Implications : -Confirming this hypothesis could inform educational policy, guide resource allocation to different program types, or adapt  curricula to improve student outcomes. Related to Classwork: -  One-way ANOVA is based on the assumption of normally distributed data and equal variances across groups. The analysis verified these assumptions to ensure the test results' validity .  - Post-hoc tests, such as ...

Module #12 Assignment

Image
> # Load the forecast package > library(forecast) Registered S3 method overwritten by 'quantmod': method from as.zoo.data.frame zoo Warning message: package ‘forecast’ was built under R version 4.4.2 > # Define the data > months <- c("Jan", "Feb", "March", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec") > data_2012 <- c(31.9, 27, 31.3, 31, 39.4, 40.7, 42.3, 49.5, 45, 50, 50.9, 58.5) > data_2013 <- c(39.4, 36.2, 40.5, 44.6, 46.8, 44.7, 52.2, 54, 48.8, 55.8, 58.7, 63.4) > # Combine data and create time series objects > time_series_2012 <- ts(data_2012, start = c(2012, 1), frequency = 12) > time_series_2013 <- ts(data_2013, start = c(2013, 1), frequency = 12) > # Plot the time series data > plot(time_series_2012, type = "o", col = "blue", ylim = range(data_2012,...

Module #11 Assignment

#Part 1: Additive Model for the Ashina Dataset > library(ISwR) > data(ashina) > ashina$subject <- factor(1:16) > act <- data.frame(vas = ashina$vas.active, subject = ashina$subject, treat = 1, period = ashina$grp) > plac <- data.frame(vas = ashina$vas.plac, subject = ashina$subject, treat = 0, period = ashina$grp) > combined <- rbind(act, plac) > additive_model <- lm(vas ~ subject + treat + period, data = combined) > summary(additive_model) Call: lm(formula = vas ~ subject + treat + period, data = combined) Residuals: Min 1Q Median 3Q Max -48.94 -18.44 0.00 18.44 48.94 Coefficients: (1 not defined because of singularities) Estimate Std. Error t value Pr(>|t|) (Intercept) -113.06 27.39 -4.128 0.000895 *** subject2 51.50 37.58 1.370 0.190721 subject3 121.50 37.58 3.233 0.005573 ** subject4 97.00 37.58 2.581 0.020867 * subject5 125.00 37.58 3.32...

Module #10 Assignment

> library(ISwR) > # Fit the linear model to predict spemax based on other variables > model <- lm(pemax ~ age + weight + bmp + fev1, data = cystfibr) > anova_results <- anova(model) > print(anova_results) Analysis of Variance Table Response: pemax Df Sum Sq Mean Sq F value Pr(>F) age 1 10098.5 10098.5 18.4385 0.0003538 *** weight 1 945.2 945.2 1.7258 0.2038195 bmp 1 2379.7 2379.7 4.3450 0.0501483 . fev1 1 2455.6 2455.6 4.4836 0.0469468 * Residuals 20 10953.7 547.7 --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 > summary_results <- summary(model) > print(summary_results$coefficients) Estimate Std. Error t value Pr(>|t|) (Intercept) 179.295719 61.8854992 2.897217 0.008909191 age -3.418055 3.3085843 -1.033087 0.313894581 weight 2.688189 1.1726985 2.292311 0.032866749 bmp -2.065693 0.8198405 -2.519628 ...

Module #9 Assignment

#1 > # Data frame creation > 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") + ) > > # Display the data frame > assignment_data Country age salary Purchased 1 France 44 6000 No 2 Spain 27 5000 Yes 3 Germany 30 7000 No 4 Spain 38 4000 No 5 Germany 40 8000 Yes 6 France 35 5500 Yes 7 Spain 52 4500 No 8 France 48 6000 Yes 9 Germany 45 7500 No 10 France 37 5000...

Module #8 Assignment

#1  > # Data for each group > high_stress <- c(10, 9, 8, 9, 10, 8) > moderate_stress <- c(8, 10, 6, 7, 8, 8) > low_stress <- c(4, 6, 6, 4, 2, 2) > > # Combine data into a data frame > reaction_time <- c(high_stress, moderate_stress, low_stress) > stress_level <- factor(rep(c("High_Stress", "Moderate_Stress", "Low_Stress"), each=6)) > > # Create a data frame > data <- data.frame(Stress_Level = stress_level, Reaction_Time = reaction_time) > > # Perform ANOVA > anova_model <- aov(Reaction_Time ~ Stress_Level, data=data) > > # Summary of ANOVA > summary(anova_model) Df Sum Sq Mean Sq F value Pr(>F) Stress_Level 2 82.11 41.06 21.36 4.08e-05 Residuals 15 28.83 1.92 Stress_Level *** Residuals --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 > > # Detailed ANOVA table > anova_table <- su...