Publications by Joey Campbell
Introduction to Time Series
Libraries install the package fpp3 and make sure to install dependencies #install.packages('fpp3', dep=T) library(fpp3) Warning: package ‘fpp3’ was built under R version 4.4.3Registered S3 method overwritten by 'tsibble': method from as_tibble.grouped_df dplyr ── Attaching packages ───────────�...
16949 sym R (2887 sym/29 pcs) 24 img
Time series regression, autocorrelation, moving averages.
Section 5.11 Problem #8 8. Consider the number of pigs slaughtered in New South Wales (data set aus_livestock). a. Produce some plots of the data in order to become familiar with it. nsw_pigs <- aus_livestock |> filter(State == "New South Wales", Animal == "Pigs") nsw_pigs |> autoplot(Count) Data generally follows a downward trend, howeve...
9042 sym Python (1961 sym/12 pcs) 8 img
Exponential Smoothing Models
Section 8.8 Problem#6 6. Forecast the Chinese GDP from the global_economy data set using an ETS model. Experiment with the various options in the ETS() function to see how much the forecasts change with damped trend, or with a Box-Cox transformation. Try to develop an intuition of what each is doing to the forecasts. [Hint: use a relatively la...
10073 sym 9 img
Arima Models
library(fpp3) Warning: package ‘fpp3’ was built under R version 4.4.3── Attaching packages ─────────────────────────── fpp3 1.0.1 ── ✔ tibble 3.2.1 ✔ tsibble 1.1.6 ✔ dplyr 1.1.4 ✔ tsibbledata 0.4.1 ✔ tidyr 1.3.1 ✔ feasts 0.4.1 ✔...
10172 sym R (2843 sym/28 pcs) 17 img
Classification using Tidymodels
Data understanding In Data Understanding, you: Import data Clean data Format data properly Create new variables Get an overview about the complete data Split data into training and test set using stratified sampling Discover and visualize the training data to gain insights Setup If you like to install all packages at once, use the code below. #in...
85446 sym R (30258 sym/132 pcs) 32 img 4 tbl
Linear Regression In R
Introduction Linear regression models (also known as “Ordinary Least Squares” model) allow us to determine if changing the values on a variable is associated with the values of another variable. In other words, if I make a 1-unit change in \(X\), how much does \(Y\) change? In fact, linear regression is similar to the algebraic equation fo...
172407 sym R (11569 sym/58 pcs) 12 img 6 tbl
Survival Analysis in R
This notebook provides an introduction to survival analysis, and to conducting a survival analysis in R. Last updated: 2025-01-07 First, install and load some packages that will be used throughout. # Install packages if needed # install.packages(c("knitr", "dplyr", "survival", "ggplot2", "here", "tibble")) library(knitr) library(dplyr) librar...
31078 sym R (10200 sym/65 pcs) 19 img 9 tbl
Interpreting Logistic Regression Coefficients
Different ways to interpret logistic regression results Interpreting the results of a logistic regression model involves understanding how the predictor variables affect the probability of the outcome event. Here are some common ways to interpret logistic regression results: Coefficients and Odds Ratios Coefficients: These represent the change...
4254 sym R (6936 sym/15 pcs) 4 img
Multivariable Logistic Regression in R
This notebook lecture will cover multivariable logistic regression in R, using the Titanic survival dataset as an example. Introduction Univariable models are insufficient for understanding complex phenomena because they do not account for the interconnectedness of multiple factors. Multivariable logistic regression is a more realistic approac...
20985 sym R (8429 sym/58 pcs) 12 img 1 tbl
Automated EDA in R
Here we try automating exploratory data analysis with DataExplorer. We start by loading hospital dataset from Kaggle into Rstudio. library(readr) healthcare<-read_csv("C:/Users/email/Downloads/Healthcare_Investments_and_Hospital_Stay (1).csv") Rows: 518 Columns: 6── Column specification ──────────────────�...
3209 sym R (8358 sym/13 pcs) 4 img