Your Perfect Assignment is Just a Click Away

We Write Custom Academic Papers

100% Original, Plagiarism Free, Customized to your instructions!

glass
pen
clip
papers
heaphones

Dataset in the Community Crime File Problems

Dataset in the Community Crime File Problems

Problem 1 (there is only one problem, in several parts)

The file CommunityCrime.csv is a dataset containing 319 observations on 123 variables.
The observations are communities within the United States. The data combines
socioeconomic data from the 1990 US Census, law enforcement data from the 1990 US
LEMAS survey, and crime data from the 1995 FBI Uniform Crime Reporting program. A
detailed description of all variables is available at http://archive.ics.uci.edu/ml/machine-
learning-databases/communities/communities.names. We seek to predict the variable
ViolentCrimesPerPop, the total number of violent crimes per 100,000 people.
Note: when asked to perform cross-validation to select a tuning parameter, be sure to
conduct this cross-validation on the training data only, then see how well your cross-
validated tuning parameter does on the test data.
a) Set a seed of 1 and split the data into a 90% training set, and a 10% test set.
b) Fit a linear model using least squares on the training set. Report the test error
obtained.
c) Fit a ridge regression model on the training set with ?? chosen by cross-validation.
Report the test error obtained.
d) Fit a lasso model on the training set with ?? chosen by cross-validation. Report the
test error obtained, along with the number of non-zero coefficient estimates.
Note: For parts e) and f) below: When you are identifying the value of ?? from the validation
plot, you may need to zoom in to see what is happening with a small number of components.
In your command, you can add in options like xlim=c(0,20) or ylim=c(0,1), adjusting the
numeric values as needed to provide a useful view.
e) Fit a PCR model on the training set with ?? chosen by cross-validation. Report the
test error obtained along with the value of ?? selected by cross-validation.

f) Fit a PLS model on the training set with ?? chosen by cross-validation. Report the
test error obtained, along with the value of ?? selected by cross-validation.
g) Comment on the above parts and how well you believe we can predict violent crime
rate using these methods.

Order Solution Now

Our Service Charter

1. Professional & Expert Writers: School Assignment only hires the best. Our writers are specially selected and recruited, after which they undergo further training to perfect their skills for specialization purposes. Moreover, our writers are holders of masters and Ph.D. degrees. They have impressive academic records, besides being native English speakers.

2. Top Quality Papers: Our customers are always guaranteed papers that exceed their expectations. All our writers have +5 years of experience. This implies that all papers are written by individuals who are experts in their fields. In addition, the quality team reviews all the papers before sending them to the customers.

3. Plagiarism-Free Papers: All papers provided by School Assignment are written from scratch. Appropriate referencing and citation of key information are followed. Plagiarism checkers are used by the Quality assurance team and our editors just to double-check that there are no instances of plagiarism.

4. Timely Delivery: Time wasted is equivalent to a failed dedication and commitment. School Assignment is known for timely delivery of any pending customer orders. Customers are well informed of the progress of their papers to ensure they keep track of what the writer is providing before the final draft is sent for grading.

5. Affordable Prices: Our prices are fairly structured to fit all groups. Any customer willing to place their assignments with us can do so at very affordable prices. In addition, our customers enjoy regular discounts and bonuses.

6. 24/7 Customer Support: At School Assignment, we have put in place a team of experts who answer all customer inquiries promptly. The best part is the ever-availability of the team. Customers can make inquiries anytime.