Publications by CasualStatistician

Univariate Outlier Detection pt 1

19.01.2025

Outlier Analysis in R Author Dr. Danilo Petti University of Essex Univariate Outlier Analysis in R options(repos = c(CRAN = "https://cloud.r-project.org")) utils::install.packages("outliers") The downloaded binary packages are in /var/folders/gp/ky553cmj3wl6fq4t7t44mfxc0000gn/T//RtmpeNic5K/downloaded_packages utils::install.packages('En...

7304 sym Python (2243 sym/23 pcs) 2 img

Lab 1 Exploratory Data Analysis

03.10.2023

Lab 1 Exploratory Data Analysis Dr. Danilo Petti, Lecturer in Statistics and Data Science 2023-10-03 Exploratory Data Analysis NOTE: Before to procede please run the following commands install.packages(faraway), install.packages(ggplot2). # Most of the data we are going to work with are taken from faraway package library(faraway) # call the pac...

6305 sym Python (4679 sym/28 pcs) 11 img

Lab 2: Estimation

03.10.2023

Lab 2 Estimation Dr. Danilo Petti, Lecturer in Statistics and Data Science 2023-10-03 Estimation We can start by recalling some basics notions from lecture notes, by multiple linear model we mean something like this \[ Y=\beta_0+\beta_1X_1+\beta_2X_2+\dots+\beta_pX_p+ \epsilon \] where \(\beta_i\,\,\,i=0,\dots,p\) are unknown parameters and \(\bo...

15025 sym 14 img

Lab 3:Inference

03.10.2023

Lab 3 Inference Dr. Danilo Petti, Lecturer in Statistics and Data Science 2023-10-03 library(faraway) Inference With our model estimation complete, we can now move on to making inferences. It’s important to note that to estimate the intercept \(\beta_0\) and the parameters \(\beta_i\) for \(i=1,\dots, p\), no particular assumptions are require...

5581 sym

Lab 4 Prediction & Transformation

03.10.2023

Lab 4 Prediction & Transformation Dr. Danilo Petti, Lecturer in Statistics and Data Science 2023-10-03 Predictions Up until now, we’ve covered the process of estimating a linear model and making inferences based on that model. In this lab, our focus will shift towards the topic of prediction. The problem at hand can be summarized as follows: gi...

10954 sym 10 img 1 tbl

Lab 6 Imputation Methods: Brief Introduction

03.10.2023

Lab 6 Imputation Methods Dr. Danilo Petti, Lecturer at University of Essex 2023-10-03 #install.packages(mice) #install.packages(lavaan) library(mice) library(lavaan) Introduction In this lab, we will explore various methods for handling missing data in R. We will discuss the implications of missing data and different imputation techniques. Hand...

4192 sym 3 img

Missing At Random

11.09.2023

Do you have missing data in the dataset? … don’t ignore them. Missing data is a common issue in statistical analysis, and it can cause bias or inaccurate results. In these posts, we will explore various types of missing data mechanisms to understand how to identify them and address the issue. Previously On… Previously, we discussed the conce...

2149 sym 1 img 1 tbl

Missing Completely At Random

11.09.2023

Do you have missing data in the dataset? … don’t ignore them. Missing data is a common issue in statistical analysis, and it can cause bias or inaccurate results. In these posts, we will explore various types of missing data mechanisms to understand how to identify them and address the issue. Let’s start with the concept of missing completely...

1582 sym 1 img 1 tbl

Mean Square Error

10.09.2023

Applying an ML Algorithm is Not Enough! In the context of statistical or machine learning models, the use of metrics is essential to evaluate the performance of our estimates. Let’s explore the main features of the Mean Square Error (MSE). \[ MSE=\frac{1}{n}\sum_{i=1}^n (y_i-\hat{f}(x_i))^2, \] where \(y_i\) represents the observed value of the d...

2095 sym 1 img

Mean Absolute Deviation

10.09.2023

Applying an ML Algorithm is Not Enough! Previously on… We discussed the MSE and how it can be decomposed into prediction variance and bias. We also highlighted that its major drawback is its inability to handle outliers. In these cases, it might be wise to employ a performance measure that accounts for this particular data structure. An alternati...

1897 sym 1 img