Publications by Anna Moy
Statistical Analysis
Data Preparation # load data library(tidyverse) library(psych) library(infer) library(openintro) library(ggplot2) # read the csv file salary <- read_csv("https://raw.githubusercontent.com/AnnaMoy/portfolio/refs/heads/main/Employer's%20Salary%20Job%20Title%20and%20Country%20Information/Salary_Data.csv") salary ## # A tibble: 6,704 × 6 ## Age ...
1907 sym R (14806 sym/68 pcs) 11 img
Data 624 - Homework9
Load libraries library(tidyverse) library(fpp3) library(caret) library(RANN) library(mlbench) library(nnet) library(earth) library(party) library(AppliedPredictiveModeling) Exercise 8.1 Recreate the simulated data from Exercise 7.2: library(mlbench) set.seed(200) simulated <- mlbench.friedman1(200, sd = 1) simulated <- cbind(simulated$x, simulated...
5060 sym R (34164 sym/57 pcs) 5 img
Data 624 Homework 8
Load libraries library(tidyverse) library(fpp3) library(caret) library(RANN) library(mlbench) library(nnet) library(earth) Exercises 7.2 Friedman (1991) introduced several benchmark data sets create by simulation. One of these simulations used the following nonlinear equation to create data: where the x values are random variables uniformly distri...
2613 sym R (18164 sym/56 pcs) 3 img
Data 624 - Homework 7
Load libraries library(tidyverse) library(fpp3) library(caret) library(RANN) ## Warning: package 'RANN' was built under R version 4.4.1 library(corrplot) #Exercise 6.2. Developing a model to predict permeability (see Sect. 1.4) could save significant resources for a pharmaceutical company, while at the same time more rapidly identifying molecules t...
4186 sym R (15090 sym/56 pcs) 5 img
Data 624 - Project 1
Load libraries library(tidyverse) library(fpp3) library(readxl) library(lubridate) library(tsibble) library(zoo) library(tseries) ## Warning: package 'tseries' was built under R version 4.4.1 library(urca) library(lmtest) library(openxlsx) ## Warning: package 'openxlsx' was built under R version 4.4.1 Project 1 Part A In part A, I want you to for...
5443 sym R (31416 sym/187 pcs) 39 img
Data 624 - Homework 6
Load libraries library(tidyverse) library(fpp3) Exercises 9.1 Figure 9.32 shows the ACFs for 36 random numbers, 360 random numbers and 1,000 random numbers Explain the differences among these figures. Do they all indicate that the data are white noise? In the first figure on the left it indicates the 36 numbers have a lag that are between .05 an...
5409 sym R (10414 sym/65 pcs) 25 img
Data 624 Homework 5
Load libraries library(tidyverse) library(fpp3) 8.1 Exercises Consider the the number of pigs slaughtered in Victoria, available in the aus_livestock dataset. Use the ETS() function to estimate the equivalent model for simple exponential smoothing. Find the optimal values of α and ℓ0, and generate forecasts for the next four months. The optim...
4515 sym R (10777 sym/61 pcs) 10 img
Data624 Homework 4
Load libraries library(tidyverse) library(fpp3) library(corrplot) Exercises 3.1 The UC Irvine Machine Learning Repository6 contains a data set related to glass identification. The data consist of 214 glass samples labeled as one of seven class categories. There are nine predictors, including the refractive index and percentages of eight elements: N...
2724 sym R (5965 sym/16 pcs) 5 img
Data 624 - Homework 3
Load libraries library(tidyverse) library(fpp3) 5.1 Exercises Produce forecasts for the following series using whichever of NAIVE(y), SNAIVE(y) or RW(y ~ drift()) is more appropriate in each case: Australian Population (global_economy) Most appropriate to use the drift method since it has an upward trend in the data. population_fit <- global_eco...
3370 sym R (6063 sym/40 pcs) 18 img
Data 624 Homework 2
library(tidyverse) library(fpp3) library(seasonal) 3.1 Exercises Consider the GDP information in global_economy. Plot the GDP per capita for each country over time. Which country has the highest GDP per capita? How has this changed over time? Monaco has the highest GDP per capita. Monaco and Liechtenstein has the highest GDP per capita from 1985 t...
4926 sym R (3385 sym/17 pcs) 21 img