FIND A SOLUTION AT My Australian Academy

Final Project

You are just hired as a Senior Business Analyst in Bank of Universe (BOU). BOU is a private company founded twenty years ago and now has more than 5,000 employees. BOU did all the research, chose the insurance company, and picked plan options for employees twenty years ago. The new CEO, Mr. Buffet, wants to make changes and offer self-funded Health Plans (SHP) starting next year. SHP is cheaper for BOU, since BOU does not have to pay for the separate insurance carrier by taking some risks. BOU has received several years’ medical costs in file insurance.csv from the current insurance carrier.

Data source: https://www.kaggle.com/mirichoi0218/insurance/home (Links to an external site.)

It contains the following columns:

age: age of primary beneficiary

sex: insurance contractor gender, female, male

bmi: Body mass index, providing an understanding of body, weights that are relatively high or low relative to height, objective index of body weight (kg / m ^ 2) using the ratio of height to weight, ideally 18.5 to 24.9

children: Number of children covered by health insurance / Number of dependents

smoker: smoking

region: the beneficiary’s residential area in the US, northeast, southeast, southwest, northwest.

charges: individual medical costs billed by health insurance

Assignment Tasks

You are asked to perform the following tasks by writing a script in R. Submit both R codes and a Word document.

Load the dataset insurance.csv into memory.

Convert the following predictors to factors using the function factor():

sex

smoker

region

Build a multiple linear regression model.

Perform multiple linear regression with charges as the response and the predictors are age, sex, bmi, children, smoker, and region. Print out the results using the summary() function.

Is there a relationship between the predictors and the response?

Does sex have a statistically significant relationship to the response?

Perform best subset selection using the bestglm() function based on BIC. What’s the best model based on BIC?

Compute the test error of the best model in #3d based on BIC using LOOCV.

Calculate the test error of the best model in #3d based on BIC using 10-fold CV.

Build a random forest model using function randomForest(), where charges is the response and the predictors are age, sex, bmi, children, smoker, and region.

Split the dataset into a training set containing 80% of the original data and the test set containing the remaining 20%.

Compute the test error using the test data set.

Extract variable importance measure using the importance() function.

Plot the variable importance using the function, varImpPlot(). Which are the top 3 important predictors in this model?

Build a support vector machine model

Split the dataset into a training set containing 80% of the original data and the test set containing the remaining 20%.

The response is charges and the predictors are age, sex, bmi, smoker, and region. Please use the svm() function with radial kernel and gamma=5 and cost = 50.

Perform a grid search to find the best model with potential cost: 1, 10, 50, 100 and potential gamma: 1,3 and 5 and using radial kernel and training dataset.

Print out the model results. What’s the best model parameters?

Forecast charges using the test dataset and the best model found in c).

Get the true observations of charges in the test dataset.

Compute the MSE (Mean Squared Error) on the test data.

Perform the k-means cluster analysis.

Remove the sex, smoker, and region, since they are not numerical values.

Determine the optimal number of clusters. Justify your answer. It may take longer running time since it uses a large dataset.

Perform k-means clustering using the 3 clusters.

Visualize the clusters in different colors.

Build a neural networks model.

Remove the sex, smoker, and region, since they are not numerical values.

Standardize the inputs using the scale() function.

Convert the standardized inputs to a data frame using the as.data.frame() function.

Split the dataset into a training set containing 80% of the original data and the test set containing the remaining 20%.

The response is charges and the predictors are age, bmi, and children. Please use 1 hidden layer with 1 neuron.

Plot the neural networks.

Forecast the charges in the test dataset.

Get the observed charges of the test dataset.

Compute test error (MSE).

- Assignment status: Already Solved By Our Experts
**(USA, AUS, UK & CA PhD. Writers)**

QUALITY: 100% ORIGINAL PAPER – **NO PLAGIARISM** – CUSTOM PAPER