Question

In: Statistics and Probability

In R, Use the anorexia data set for questions 8-15 Recall there are three distinct treatments....

In R, Use the anorexia data set for questions 8-15

Recall there are three distinct treatments. You may be suspicious that there is a significant difference in the mean weights assigned to the different treatments. It is not a good experimental design if one of the treatments has subjects who are starting in a better position than the subjects of other treatments. To test if this is a well-designed experiment we perform an ANOVA analysis .The null hypothesis is the mean weight of the subjects assigned to each treatment group is the same.

Data set:

Treat

<fctr>

Prewt

<dbl>

Postwt

<dbl>

1 Cont 80.7 80.2
2 Cont 89.4 80.1
3 Cont 91.8 86.4
4 Cont 74.0 86.3
5 Cont 78.1 76.1
6 Cont 88.3 78.1
  1. What is the value of the test statistic for the ANOVA test?

  2. What is the p-value for the ANOVA test?

  3. Using a significance level 0f 0.05, do you reject the null hypothesis?

  4. What is the median weight gain of subjects assigned to the control treatment?

  5. What is the median weight gain of subjects assigned to the CBT treatment?

  6. What is the median weight gain of subjects assigned to the FT treatment?

  7. What is the value of the maximum weight gain?

  8. How many subjects lost weight during the course of the experiment?

Solutions

Expert Solution

In R, the comparison for PreWt and PostWt gives the following table:

> data = read.csv("C:\\Users\\Temp\\Desktop\\anova.csv")
> model = lm(PostWt~PreWt, data = data)
> anova(model)
Analysis of Variance Table

Response: PostWt
Df Sum Sq Mean Sq F value Pr(>F)
PreWt 1 0.053 0.0534 0.0024 0.9637
Residuals 4 90.827 22.7067   

1. Test statistic : 0.0024

2. P-value: 0.9637

3. since p-value > 0.05. We fail to reject Ho or can say that mean weight of the subjects assigned to each treatment group is not the same.

And summary for model is:

> summary(model)

Call:
lm(formula = PostWt ~ PreWt, data = data)

Residuals:
1 2 3 4 5 6
-0.9562 -1.1824 5.0828 5.2409 -5.0185 -3.1665

Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 79.9857 25.1205 3.184 0.0334 *
PreWt 0.0145 0.2992 0.048 0.9637
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 4.765 on 4 degrees of freedom
Multiple R-squared: 0.0005873,   Adjusted R-squared: -0.2493
F-statistic: 0.002351 on 1 and 4 DF, p-value: 0.9637.

4. Median for PreWt = (80.7+89.4)/2 = 85.05

5. Median for PostWt = (80.1+80.2)/2 = 80.15

6. For observation 4, gain was maximum as PreWt =

74.0

and PostWt =

86.3

and gain = 86.3-74 = 12.3

7. All those subjects for which PostWt < PreWt lost their weight. So, For 1,2,3,5 and 6 weight loss was observed. Hence, 5 subjects lost their weight.

Please rate my answer and comment for doubt.


Related Solutions

The dataset ’anorexia’ in the MASS package in R-Studio contains data for an anorexia study. In...
The dataset ’anorexia’ in the MASS package in R-Studio contains data for an anorexia study. In the study, three treatments (Treat) were applied to groups of young female anorexia patients, and their weights before (Prewt) and after (Postwt) treatment were recorded. The three treatments adminstered were no treatment (Cont), Cognitive Behavioural treatment (CBT), and family treatment (FT). Determine at the 5% significance level if there is a difference in mean weight gain between those receiving no treatment and those receiving...
The dataset ’anorexia’ in the MASS package in R-Studio contains data for an anorexia study. In...
The dataset ’anorexia’ in the MASS package in R-Studio contains data for an anorexia study. In the study, three treat- ments (Treat) were applied to groups of young female anorexia patients, and their weights before (Prewt) and after (Postwt) treatment were recorded. The three treatments adminstered were no treatment (Cont), Cognitive Behavioural treatment (CBT), and family treatment (FT). Determine at the 5% significance level if there is a difference in mean weight gain between those receiving no treatment and those...
2. The dataset ’anorexia’ in the MASS package in R-Studio contains data for an anorexia study....
2. The dataset ’anorexia’ in the MASS package in R-Studio contains data for an anorexia study. In the study, three treatments (Treat) were applied to groups of young female anorexia patients, and their weights before (Prewt) and after (Postwt) treatment were recorded. The three treatments adminstered were no treatment (Cont), Cognitive Behavioural treatment (CBT), and family treatment (FT). Determine at the 5% significance level if Cognitive Behavioral treatment is effective in helping patients gain weight. Perform all necessary steps for...
Given the data set (treatments 1 to 4) with respective outcome, what is the R code...
Given the data set (treatments 1 to 4) with respective outcome, what is the R code I can use to Find a 95 percent confidence interval on the mean strength of the 4 techniques. Also for finding a 95 percent confidence interval on the difference in means. (i.e 1 vs 3 , 2 vs 4 etc) strength group 3129 1 3000 1 2865 1 2890 1 3200 2 3300 2 2975 2 3150 2 2800 3 2900 3 2985 3...
Write code in R for this questions,, will vote!! Load the Taxi.txt data set into R....
Write code in R for this questions,, will vote!! Load the Taxi.txt data set into R. (a) Calculate the mean, median, standard deviation, 30th percentile, and 65th percentile for Mileage and TripTime. (b) Make a frequency table for PaymentProvider that includes a Sum column. Report the resulting table. (c) Make a contingency table comparing PaymentType and Airport. Report the resulting table. (d) Use the cor() function to find the correlation between each pair of the Meter, Tip, Mileage, and TripTime...
Assume that 18 subjects received one of three treatments and produced the data reported in Data Set B.
  Assume that 18 subjects received one of three treatments and produced the data reported in Data Set B. Conduct a one-way ANOVA to see if the means of the three treatments are different on a statistically significant level. Complete an ANOVA table reporting the relevant SS, df, MS, and Fs. Also remember to include your critical value and whether you would reject your null hypothesis. Data Set B Treatment 1 Treatment 2 Treatment 3 50 60 70 55 60...
Recall that a set B is dense in R if an element of B can be...
Recall that a set B is dense in R if an element of B can be found between any two real numbers a < b. Take p∈Z and q∈N in every case. It is given that the set of all rational numbers p/q with 10|p| ≥ q is not dense in R. Explain, using plain words (without a rigorous proof), why this is. That is, present a general argument in plain words. Does this set violate the Archimedean Property? If...
using the mtcars data set data(mtcars) USE data in mtcars library in R 5.Use k means...
using the mtcars data set data(mtcars) USE data in mtcars library in R 5.Use k means cluster analysis. 6. Get cluster means. 7. Visualize the clustering result.
Background: Anorexia is well known to be difficult to treat. The data set provided below contains...
Background: Anorexia is well known to be difficult to treat. The data set provided below contains data on the weight gain for three groups of young female anorexia patients. These groups include a control group, a group receiving cognitive behavioral therapy and a group receiving family therapy. Source: Hand, D. J., Daly, F., McConway, K., Lunn, D. and Ostrowski, E. eds (1993) A Handbook of Small Data Sets. Chapman & Hall, Data set 285 (p. 229). Directions: Click on the...
Background: Anorexia is well known to be difficult to treat. The data set provided below contains...
Background: Anorexia is well known to be difficult to treat. The data set provided below contains data on the weight gain for three groups of young female anorexia patients. These groups include a control group, a group receiving cognitive behavioral therapy and a group receiving family therapy. Source: Hand, D. J., Daly, F., McConway, K., Lunn, D. and Ostrowski, E. eds (1993) A Handbook of Small Data Sets. Chapman & Hall, Data set 285 (p. 229). Directions: Click on the...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT