Regression analysis in R

Job ID: 32349720

Budget: $10 – $100 USD

Part 1
Consider the "cabbages" data set provided; the data itself is in cabbages.csv and the documentation is provided in cabbages.txt.
1. Using symbols (e.g., ?? ? = ? + ?? + ?? ?, which is the basic model for an ANOVA), write a simple linear
model describing the relationship between weight of a head of cabbage and its ascorbic acid content.
What do each of the symbols represent?
2. Using only basic math functions, such as sums and exponents, and simple summary statistics, such as
means, and the ordinary least squares procedure, estimate the coefficients in this model from the data
provided.
3. Using your software of choice, show that you have calculated the coefficients correctly.
4. Provide a figure that helps visualize the relationship between head weight and ascorbic acid in this
data. This figure should look professional: include proper axis labels in words (not variable names), a
title, appropriate shapes and colors, and so on.
5. Can you improve your model by considering the cultivar and planting date of each cabbage? Using
software to estimate coefficients, compare the simpler model you wrote above with the more complicated model considering more information. What measures or values did you use to compare the two
models? Which model is better, and why?
6. Interpret the coefficient associated with the cultivar of the head of cabbage.
7. How would you interpret the coefficients associated with the planting date? Why is there more than
one? What does each coefficient estimate mean?

Part 2
1. Estimate your multiple regression model from 1.5 by maximum likelihood (i.e., a generalized linear
model) rather than by ordinary least squares as you did before. What are the differences, if any, between
your model in 1.5 and this version?

2. What probability distribution did you use to model your response variable, ? (ascorbic acid content)?
Why do you expect this model to work—that is, what about this system led you to believe your model
choice was appropriate? Explain your choice in a paragraph or so of text without referring to this
particular data set.
3. Does the data from this data set support your theoretical choice? Present figures or summary statistics
that support your argument.

Part 3
Consider the melanoma data (melanoma.csv, melanoma.txt). This data is properly analyzed with what is
called a proportional hazards model, but let’s use the tools we have: ignore the ‘time‘ variable and assume that
the ‘status‘ variable simply reflects the status of the individual at a follow-up time, whenever that was. Let’s
say we are interested in the relationship between features of a malignant melanoma (its size, operationalized
as its thickness, and whether an ulcer was present or not) and whether or not the patient was alive at the time
of follow-up.
1. What type of regression model is most appropriate for this question, and why?
2. Do you need to do any data management in order to fit your model? If so, what do you choose to do,
and why?
3. What predictor variables will you use in your model? Why did you choose these variables?
4. Estimate your model, present the results in a table, and interpret the results in words (a paragraph or
so)