R programming

Module Assignment

Module 4

QMB-6304 Analytical Methods for Business

Write a simple R script to execute the following:

Preprocessing

  1. Load into R the data included in “Assignment 4 Data.xlsx”.  This data set shows age (years), weight (pounds), and height (inches) for 251 adults.  This will be your master data set.
  2. Create a new variable in the master data set which will be each individual’s body mass index.  The calculation should be done as:

BMI=(weight* .45)(height* .025)2

  1. Using the method presented in class and applying the numerical portion of your U number as a random number seed, take a random sample of 45 cases from the master data set. This will be your primary data set.

Analysis

  1. Use R to conduct a simple linear regression on the data with weight as the independent variable and bmi as the dependent variable.  As a part of this be sure to:
    1. Report the beta coefficients and associated p values and confidence intervals from your model.
    2. Give a written interpretation of your beta coefficients in terms of the actual case at hand.
    3. Assess your model’s conformance with the LINE assumptions of regression.
    4. Give a prediction using your model for an individual weighing 185 pounds. Include 95% confidence and prediction intervals and written interpretations of both intervals.
  2. A 10-year-old boy has been presented to you who weighs 72 pounds.  Give two reasons for why it would be wrong to use your model to predict the boy’s BMI.

Your deliverable will be a single MS-Word file showing 1) the R script which executes the above instructions and 2) the results of those instructions.  The first line of your script file should be a “#” comment line showing your name as it appears in Canvas.  Results should be presented in the order in which they are listed here.  Deliverable due time will be announced in class and on Canvas.  This is an individual assignment to be completed and submitted by the time stated on Canvas.  No collaboration of any sort is allowed on this assignment.  Please remember the prohibition on using screen shots in your deliverable.

Tags: No tags