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
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...
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...
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...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT