Categories
R

Explain why and what explicit variables you suggest incorporating.

Learning Goal: I’m working on a r report and need an explanation and answer to help me learn.
(R Language) Determining poisonous mushrooms in data with decision tree models
Details
You will document in a report the results of each step of the mining process, analyze and interpret the results. Suggest the characteristics to use when determining if a mushroom is safe to eat. Make recommendations for additional analysis and variables to examine to build other classifications such as use of the mushrooms that are not poisonous.
The report should include the following:
Code walk through: in this section provide a step by step explanation of how the code is interacting with and/or transforming the data. Provide examples from the output to support your explanations.
Analysis: Based on the output, analyze the data and the relationships revealed about the variables of interest. Explains the insights provided by the output. Use visualizations to support your analysis.
Interpretation and Recommendations: Interpret the results of your analysis and explain what the results mean for the data owner. Provide recommendations for actions to be taken based on your interpretation. Support those with the data. Explain why and what explicit variables you suggest incorporating. For example, median income by city and state from the census.gov website might be useful for examining home ownership.
Both the r-code file and the word file are required.
Apa style formatting.
No of pages 8 (1800 words)
References page required and intext citations are must

Categories
R

Explain why and what explicit variables you suggest incorporating.

Learning Goal: I’m working on a r report and need an explanation and answer to help me learn.
(R Language) Determining poisonous mushrooms in data with decision tree models
You will document in a report the results of each step of the mining process, analyze and interpret the results. Suggest the characteristics to use when determining if a mushroom is safe to eat. Make recommendations for additional analysis and variables to examine to build other classifications such as use of the mushrooms that are not poisonous.
The report should include the following:
Code walk through: in this section provide a step by step explanation of how the code is interacting with and/or transforming the data. Provide examples from the output to support your explanations.
Analysis: Based on the output, analyze the data and the relationships revealed about the variables of interest. Explains the insights provided by the output. Use visualizations to support your analysis.
Interpretation and Recommendations: Interpret the results of your analysis and explain what the results mean for the data owner. Provide recommendations for actions to be taken based on your interpretation. Support those with the data. Explain why and what explicit variables you suggest incorporating. For example, median income by city and state from the census.gov website might be useful for examining home ownership.
Both the r-code file and the word file are required.No of pages 7

Categories
R

Is it more expensive or less expensive to live in FL or NY?

Learning Goal: I’m working on a r question and need an explanation and answer to help me learn.
Review the attached file. Suzie has an issue. She can either move to NY or FL and needs to review some data that her agent gave her. The agent reviewed house prices and crime ratings for houses that Suzie would be interested in based on her selection criteria. She wants to live in an area with lower crime but wants to know a few things:
Is it more expensive or less expensive to live in FL or NY?
Is the crime rate higher in FL or NY (Note a low score in crime means lower crime)?
Is the crime rate higher in lower or higher house price areas?
Using the R tool, show the data in the tool to answer each of the questions. Also, show the data visualization to go along with the summary.
If you were Suzie, where would you move based on the questions above?
After you gave Suzie the answer above (to #4), she gave you some additional information that you need to consider:She has $100,000 to put down for the house.
If she moves to NY she will have a job earning $120,000 per year.
If she moves to FL she will have a job earning $75,000 per year.
She wants to know the following:On average what location will she be able to pay off her house first based on average housing prices and income she will receive?
Where should she move and why? Please show graphics and thoroughly explain your answer here based on the new information provided above.
Note: The screenshots should be copied and pasted and must be legible. Only upload the word document. Be sure to answer all of the questions above and number the answers. Be sure to also explain the rational for each answer and also ensure that there are visuals for each question above. Use at least two peer reviewed sources to support your work.

Categories
R

Supposing you were presenting regression results to your colleagues, how would you describe one of these intervals?

Need to run R-Studio to answer all questions.
Questions are here: https://drive.google.com/file/d/169-0GcCiU2YBhM0Ux…
Data are here: https://drive.google.com/file/d/12bm9RYaZrZH7AGDo9…

title: “Computational Homework 3”
“`{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
library(pacman)
p_load(ggplot2, tidyverse)
“`
# Q1
The dataset Guns.csv contains data on 50 US states plus the District of Columbia for the 23 years 1977-1999. The main variables of interest are vio (the violent crime rate) and shall, a dummy variable for whether the state had a ‘shall-carry’ law in effect that year (i.e. a law instructing local authorities to issue concealed weapons permits to all citizens, with some restrictions). Recall that a dummy variable is any binary variable, and will take a value of 1 only if a particular condition is met. In this, case the treatment of having this law in place being in effect for a given state at a given time. The data set includes other variables, for a description see the definitions table posted on Canvas.
Follow the instructions below to prepare an analysis between these two random variables
### 1. Import the Guns.csv file using read_csv()(2. pts)
“`{r, import_data}
# Importing data and assigning it as a variable
gundata <- read_csv(“Guns.csv”)
# Showing the initial portion of data
gundata
“`
### 2. Run the following code once you have loaded your data. This will mutate your data to include the state names by creating a new dataset and then forming a merge. You will need to replace the object name with what you chose to name your data object. (2. pts)
“`{r, q1q2 }
# Running code and replacing the object name with chosen data object name
matching_obj <- tibble(
stateid = unique(gundata$stateid),
statename = c(state.name[1:8], “Dis. of Columbia”, state.name[9:50])
)
# To match all your names to the ids, we’ll use dplyr’s `left_join()`, any matching variable names will be assessed as the details to match on. When stateid 1 is detected across multiple rows, it will fill in “Alabama” under each for the new variable “statename”.
Guns <- left_join(gundata, matching_obj)
# As you can see it only used “stateid” from both objects to match observations from our right-hand data set “matching_obj” and join them into the left object “Guns”
# Use View(Guns) in the console to see how this worked out for your new statename variable
“`
### 3. Referring to your data object, summarise the average level of gun violence per statename into a separate data object using group_by() and summarise(). (6. pts)
“`{r, q1q3}
# Creating new data frame – grouping statename types
“`
### 4. Present a visualization you consider appropriate for exposing these underlying state differences you generated in part 3. (Hint: glimpse(data) is a great way to choose which variables you need to focus on). (6. pts)
“`{r, q1q4}
# Creating additional column – avg income by state
“`
“`{r, plotting}
# Plotting the correlation between violence and income
“`
### 5. Provide comment on this distribution of gun violence, does anything strike you, from looking at these averages of the violent crime rate (incidents per 100,000 members of the population) over time, per state? Use some of the other variables in the dataset for gleaning further insight. (4. pts)
Note: These data were provided by Professor John Donohue of Stanford University and were used in his paper with Ian Ayres “Shooting Down the ‘More Guns Less Crime’ Hypothesis” Stanford Law Review, 2003, Vol. 55, 1193-1312.
# Q2 Gun Violence (Regression and Inference)
Now that we have a better grasp of what our data is looking at, lets see how these “shall-carry law” laws affected average violent crime rates.
### 1. Regress the following relationship and store your estimates of our two population parameters using the tidy() function into an object called reg_all. (5. pts)
“`{r, q2q1}
# Regressing the relationship of “shall-carry law” laws affecting average violent crime rates
# Assigning estimates of population parameters into an object called reg_all
“`
### 2. Provide a stargazer table for these results. How would you interpret the regression results? Comment on the meaning behind our estimated coefficient and determine the statistical significance of this result. (4. pts)
### 3. Construct confidence intervals at the 99%, 95%, 90%, 80% and 70% level. Use geom_errorbar() to portray each of these confidence intervals in a single visualization (similar to our last slide when addressing inference). The appropriate tcrit values to use are {2.576,1.960,1.645,1.282,1.036}, respectively. (Hint: That reg_all object you created here will be useful). (4. pts)
“`{r q2q3}
“`
### 4. Supposing you were presenting regression results to your colleagues, how would you describe one of these intervals? (4. pts)
### 5. Inuitively, do you think any of our key assumptions regarding the Gauss-Markov theorem (assumptions 1 to 5) could have been violated when running this regression? For each assumption you consider violated, provide an explanation for why this may be the case. (Hint: We’ll be dealing with some of these problems when we go into multivariate regression model setting). (4. pts)