Publications by Samantha Nurmi
Classification Project: Mushrooms
Step 2 Different visuals library(rpart.plot) ## Loading required package: rpart model_tree <- rpart(class ~ ., data = mushroom.data, method = "class", cp = 0.00001) model_tree$cptable[which.min(model_tree$cptable[, "xerror"]), "CP"] ## [1] 1e-05 bestcp <- round(model_tree$cptable[which.min(model_tree$cptable[, "xerror"]), "...
77 sym R (10226 sym/33 pcs) 4 img
MATH 239: Homework 7
Part 1 A Identify your response variable, a categorical predictor, and a numeric predictor (that you suspect might be related to your response). Describe the units for these variables and for the categorical variable describe the levels. Response Variable: Total C 2014, Categorical Predictor: State, Numeric Predictor: All others B Fit a simple ...
2421 sym R (10289 sym/43 pcs) 8 img
MATH 239: Homework 5
Problem 1 # Find the t-value # Beta1/beta1SE -17.5791/6.7584 ## [1] -2.601074 3.9324/.4155 ## [1] 9.46426 #Pvalue pt(-17.5791/6.7584, df=48, lower.tail = TRUE)*2 ## [1] 0.01231831 pt(3.9324/.4155, df=1, lower.tail = FALSE)*2 ## [1] 0.06701701 # Rsquared 21186/11354 ## [1] 1.86595 Residual standard error: 15.38 on 48 degrees of freedom multiple R...
1058 sym R (1834 sym/30 pcs) 6 img
MATH 239: Homework 4
In collaboration with Bryce O’connor and Dakota Barksdale ### Problem 1: Investigating the T-stat set.seed(1) x<-rnorm(100) y<-2*x+rnorm(100) A: Perform a simple linear regression of y onto x, without an intercept. Report the β coefficient estimate β, the standard error of this coefficient estimate, and the t-statistic and p-value associate...
2883 sym R (7794 sym/39 pcs) 4 img
Homework 3 - Matt Ihling
#Question 1 - Explain what is wrong with each of the following statements: ##A The standard deviation of the bootstrap distribution will be approximately the same as the standard deviation of the original sample. If we are bootstrapping, the original distribution is almost certainly skewed. This skew will affect the standard devation. However, wi...
4963 sym R (5375 sym/25 pcs) 2 img
MATH 239: Homework 3
In collaboration with Bryce O’Connor and Dakota Barksdale Part 2: Explain what is wrong with each of the following statements. The standard deviation of the bootstrap distribution will be approximately the same as the standard deviation of the original sample. The standard deviation of a bootstrap distribution will be different from that of ...
2908 sym R (7233 sym/29 pcs) 4 img
MATH 239: Homework 1
In collaboration with Bryce O’Connor and Dakota Barksdale Problem 1: Auto Data This exercise involves the Auto data set that we studied during lab. Make sure that the missing values have been removed from the data. A. Which of the predictors are quantitative, and which are qualitative? Auto <- read.table("http://faculty.marshall.usc.edu/gareth...
3240 sym R (7975 sym/46 pcs) 8 img
Lab 1: Intro to R
Title Subtitle This is where you write out things like a normal document. The grey bars is code that actually runs. So the one above you cant see in the final link output because it says {include = FALSE} Lets look at the cars dataset: summary(cars) ## speed dist ## Min. : 4.0 Min. : 2.00 ## 1st Qu.:12.0 1st ...
517 sym R (268 sym/2 pcs) 1 img
MATH 239: Regression Project
Data Wrangling setwd("~/Desktop") nrgcen<-read.csv("Energy Census and Economic Data US 2010-2014.csv", header=TRUE) #head(nrgcen) # at state level # cols for years # might be useful but need to find wanted cols first unemp<-read.csv("output.csv", header=TRUE) #head(unemp) # at county level # need to aggregate to...
47 sym R (8855 sym/37 pcs) 4 img