Question

Using R or RStudio After loading the data crime2005 data set from the library smss, use...

Using R or RStudio

After loading the data crime2005 data set from the library smss, use (non-robust) linear regression to model the crime rate per 10,000 people (VI2) as a function of the percentage of the population that live in metropolitan areas (ME) and the percentage of the population that live below the poverty line (PO).

Enter your R code below.

Homework Answers

Answer #1

# Assign more meaningful variable names, also
# Convert is.south to a factor
# Divide average.ed by 10 so that the variable is actually average education
# Convert median assets to 1000's of dollars instead of 10's
crime <- crime %>%
rename(crime.per.million = R,
young.males = Age,
is.south = S,
average.ed = Ed,
exp.per.cap.1960 = Ex0,
exp.per.cap.1959 = Ex1,
labour.part = LF,
male.per.fem = M,
population = N,
nonwhite = NW,
unemp.youth = U1,
unemp.adult = U2,
median.assets = W,
num.low.salary = X) %>%
mutate(is.south = as.factor(is.south),
average.ed = average.ed / 10,
median.assets = median.assets / 100)
# print summary of the data
summary(crime)

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
We are interested in studying crime rates. The data are provided in a file provided with...
We are interested in studying crime rates. The data are provided in a file provided with the homework. We will use multiple variables to predict the crime rate numbers. The following variables are included: Crime is represented as the violent crime rate per 100,000. Poverty is the percentage of the population living in poverty. Bachelors shows the percentage of the state’s population with a Bachelor’s degree or higher. College indicates the percentage of high school graduates going directly to college....
9. This question involves the use of multiple linear regression on theAuto data set. (using R...
9. This question involves the use of multiple linear regression on theAuto data set. (using R script) (a) Produce a scatterplot matrix which includes all of the variables in the data set. (b) Compute the matrix of correlations between the variables using the function cor(). You will need to exclude the name variable, which is qualitative. (c) Use the lm() function to perform a multiple linear regression with mpg as the response and all other variables except name as the...
Using the data Anscombe, included in the car package, perform a regression to examine whether the...
Using the data Anscombe, included in the car package, perform a regression to examine whether the number of people living in an urban area have an effect on income. Remember to provide the code for everything. Hint: load data from the package with the following command A<-Anscombe you’re going to need the car package install.packages(“car”) library(car) income = y urban = x obs: this is not code, it’s just identifying x and y for you. Report the coefficients for urban....
r code Load the “star” data from the “faraway” package, and model “temp” using “light”. library(faraway)...
r code Load the “star” data from the “faraway” package, and model “temp” using “light”. library(faraway) data(star) fit = lm(temp ~ light, data = star) One may also suspect that the residuals (use all the data) follow a t distribution instead of normal. Using the same logic that we produced the QQ plot for comparing to the normal distribution, produce a QQ plot for comparing to a t distribution. You need to decide the degrees of freedom yourself (consider df...
Please use R or Rstudio for this exercise and show everything, including the R output. Pay...
Please use R or Rstudio for this exercise and show everything, including the R output. Pay attention in everything in Bold, please. " The data in stat5_prob2 contains values of the following four variables for 93 employees of Harris Bank Chicago in 1977: • y : beginning salary in dollars (SALARY) • x1 : years of schooling at the time of hire (EDU) • x2 : number of months of previous work experience (EXPER) • x3 : number of months...
You use the data from the Medical Expenditure Panel Survey to analyse the medical expen- diture...
You use the data from the Medical Expenditure Panel Survey to analyse the medical expen- diture of those individuals, who are 65 years and older. This group of people are qualified for health care under the Australian Medicare program. You run a regression of total medi- cal expenditure (totexp:) against a dummy variable private, which takes the value of 1 if individual i has private health insurance and 0, otherwise. The regression model is . totexpi = Bo + B1...
CONSIDER THE FOLLOWING PROPOSITION: "The way income and wealth inequality (stratification) has changed over the past...
CONSIDER THE FOLLOWING PROPOSITION: "The way income and wealth inequality (stratification) has changed over the past decades in the United States today is beneficial for our individual citizens as well as serving the greater good of our American Society." You must answer all three questions: 1.     Describe your position regarding the statement above. 2.     Present specific data from chapter 8 or articles that you believe support your conclusions. 3.     If you were "in charge" of this country how would you re-design the effort/reward...
REPORT 1: Need this solved using R or SAS Hourly Wage and Working Hours The following...
REPORT 1: Need this solved using R or SAS Hourly Wage and Working Hours The following data are from a national sample of 6000 households with a male head earning less than $15,000 annually in 1966. The households were classified into 39 demographic groups (e.g. factory workers, farmers, school teachers, etc.) Each row in the spreadsheet below corresponds to one demographic group. Hence, the spreadsheet contains 39 rows. The study was undertaken in the context of proposals for a guaranteed...
Using the model proposed by Lafley and Charan, analyze how Apigee was able to drive innovation....
Using the model proposed by Lafley and Charan, analyze how Apigee was able to drive innovation. case:    W17400 APIGEE: PEOPLE MANAGEMENT PRACTICES AND THE CHALLENGE OF GROWTH Ranjeet Nambudiri, S. Ramnarayan, and Catherine Xavier wrote this case solely to provide material for class discussion. The authors do not intend to illustrate either effective or ineffective handling of a managerial situation. The authors may have disguised certain names and other identifying information to protect confidentiality. This publication may not be...
Sign In INNOVATION Deep Change: How Operational Innovation Can Transform Your Company by Michael Hammer From...
Sign In INNOVATION Deep Change: How Operational Innovation Can Transform Your Company by Michael Hammer From the April 2004 Issue Save Share 8.95 In 1991, Progressive Insurance, an automobile insurer based in Mayfield Village, Ohio, had approximately $1.3 billion in sales. By 2002, that figure had grown to $9.5 billion. What fashionable strategies did Progressive employ to achieve sevenfold growth in just over a decade? Was it positioned in a high-growth industry? Hardly. Auto insurance is a mature, 100-year-old industry...