Publications by Kyle Kenneth B. Ruaya

STAT 56 - Multivariate Analysis of Variance (MANOVA)

06.05.2023

The Theory of MANOVA in R MANOVA stands for Multivariate ANOVA or Multivariate Analysis Of Variance. It’s an extension of regular ANOVA. The general idea is the same, but the MANOVA test has to include at least two dependent variables to analyze differences between multiple groups (factors) of the independent variable. If you only have a sing...

5193 sym R (3050 sym/11 pcs) 2 img

STAT 56 - Cluster Analysis

06.05.2023

Data Preparation # Load and scale the dataset data("USArrests") df <- scale(USArrests) head(df) ## Murder Assault UrbanPop Rape ## Alabama 1.24256408 0.7828393 -0.5209066 -0.003416473 ## Alaska 0.50786248 1.1068225 -1.2117642 2.484202941 ## Arizona 0.07163341 1.4788032 0.9989801 1.042878388 ## Arkansas...

136 sym R (7405 sym/26 pcs) 9 img

STAT 54 - Friedman Test

06.05.2023

Prerequisites library(tidyverse) ## ── Attaching packages ─────────────────────────────────────── tidyverse 1.3.2 ── ## ✔ ggplot2 3.4.0 ✔ purrr 0.3.5 ## ✔ tibble 3.1.8 ✔ dplyr 1.0.10 ## ✔ tidyr 1.2.1 ✔ stringr 1.4.1 ## ✔ r...

1644 sym R (3336 sym/20 pcs) 2 img

STAT 54 - Logistic Regression

06.05.2023

library(aod) ## Warning: package 'aod' was built under R version 4.2.3 library(ggplot2) Examples Example 1. Suppose that we are interested in the factors that influence whether a political candidate wins an election. The outcome (response) variable is binary (0/1); win or lose. The predictor variables of interest are the amount of money spent o...

11830 sym R (6052 sym/45 pcs) 1 img

STAT 56 - Factor Analysis in R

06.05.2023

library(psych) ## Warning: package 'psych' was built under R version 4.2.3 library(corrplot) ## corrplot 0.92 loaded library("psych") library(ggplot2) ## ## Attaching package: 'ggplot2' ## The following objects are masked from 'package:psych': ## ## %+%, alpha library(car) ## Loading required package: carData ## ## Attaching package: 'c...

635 sym R (11703 sym/49 pcs) 4 img

RUAYA - Activity 1 (Multivariate Analysis)

03.03.2023

Using R for Multivariate Analysis Reading Multivariate Analysis Data into R wine <- read.table("http://archive.ics.uci.edu/ml/machine-learning-databases/wine/wine.data", sep=",") wine Plotting Multivariate Data A Matrix Scatterplot a<-wine[2:6] paged_table(a) scatterplotMatrix(wine[2:6]) A Scatterplot with the Data Points Labelled...

2714 sym Python (51222 sym/103 pcs) 9 img

Exercise 2

28.09.2022

Data ## # A tibble: 27 × 5 ## PhaseInterval Temperature `Adlay with wash` `Adlay with milk` Adlay with mi…¹ ## <chr> <chr> <dbl> <dbl> <dbl> ## 1 3- day 25°C 759 220 819 ## 2 3- day 25°C 736 ...

879 sym Python (37185 sym/13 pcs) 8 img

Exercise 3

29.09.2022

ICT Training Data First, create before and after as objects containing the scores of ICT training. before <- c(12.2, 14.6, 13.4, 11.2, 12.7, 10.4, 15.8, 13.9, 9.5, 14.2) after <- c(13.5, 15.2, 13.6, 12.8, 13.7, 11.3, 16.5, 13.4, 8.7, 14.6) Now create a data matrix using data.frame() function. Use objects before and after as created earlier to ...

4367 sym R (3857 sym/20 pcs) 2 img

Exercise 4

29.09.2022

Two sample equality of variances in R 1 F-test in R The F test statistic can be obtained by calculating the ratio of the two variances F=VAR(A)/VAR(B). Before doing the F test, we need to check one of the major assumptions is data should be normally distributed. Normality distribution can be assessed based on the Shapiro test or visually usi...

2862 sym R (1984 sym/20 pcs)

Exercise 5

30.09.2022

One way ANOVA Example in R One way ANOVA Example in R, the one-way analysis of variance (ANOVA), also known as one-factor ANOVA, is an extension of the independent two-sample t-test for comparing means when more than two groups are present. The data is divided into numerous groups using one single grouping variable in one-way ANOVA (also call...

6930 sym R (5316 sym/59 pcs) 6 img