Question: R studio coding help Youre running a study to assess the effectiveness of a new diet pill, Lorcaserin. Youve randomly sampled 80 participants and assigned

R studio coding help

Youre running a study to assess the effectiveness of a new diet pill, Lorcaserin. Youve randomly sampled 80 participants and assigned 41 participants to a placebo group and 39 participants to receive the drug. You observed weight loss in both groups and recorded the results in a dataset called diet.txt. Variables include gender (gender; 1 = male), pill type (pill; 0 = placebo, 1 = Lorcaserin), and a standardized measure of pill effectiveness (loss). Import (Read in) these data (diet.txt) to answer the following question (it is copied and pasted because you cannot upload files)

1. Are placebos equally effective as Lorcaserin pills? In other words, is there a placebo effect? Run the appropriate statistical test. Things you need to include in your answer: State which test was conducted and why, provide R code, output, your hypotheses, whether the null hypothesis was rejected, an report of the results including a measure of effect size, and a substantive interpretation ( = .05, two-tailed test).

diet.txt data set:

pill loss male 1 1 0.709540159 0 2 0 2.542530492 1 3 0 -0.214148965 0 4 0 -0.362747794 0 5 0 0.066535152 1 6 1 -0.696995161 1 7 1 -0.004208418 0 8 1 1.696906741 1 9 0 -2.136372402 0 10 0 1.347649136 1 11 0 -1.382492184 0 12 0 -1.102206247 0 13 1 1.229724657 1 14 0 -1.448639412 1 15 1 0.264262564 0 16 0 -0.602253648 1 17 0 0.391796675 1 18 0 0.794553851 0 19 1 0.908514169 0 20 0 -1.014121102 1 21 1 0.84635373 0 22 1 1.119740786 0 23 0 2.76967254 0 24 1 1.255598969 1 25 0 3.545166577 1 26 1 1.378676733 1 27 0 1.521858606 0 28 1 2.312124558 1 29 0 2.221786357 0 30 0 1.70257022 1 31 0 2.546108904 0 32 1 1.56797509 0 33 0 3.293392415 1 34 0 2.508111439 0 35 1 2.800926438 1 36 1 2.302996218 0 37 1 1.20556064 0 38 1 2.480827184 0 39 0 2.141730799 1 40 0 1.575887826 0 41 0 2.924477661 1 42 1 0.804859223 0 43 1 2.585180936 0 44 1 2.052002302 1 45 1 -1.605256848 0 46 0 -0.598490789 0 47 0 1.322472123 0 48 0 -0.220292151 0 49 0 -1.187760399 1 50 1 -0.324148252 1 51 0 -0.704780429 1 52 1 2.042973093 1 53 1 -1.197843626 1 54 1 1.363241155 0 55 0 0.049038865 1 56 1 1.123379478 0 57 1 2.093884474 0 58 0 1.107539957 0 59 0 0.508552938 1 60 1 -0.556921693 1 61 1 0.723599183 0 62 1 3.677745386 0 63 0 0.682989533 0 64 0 2.316761839 0 65 0 2.054723505 1 66 0 1.525332222 0 67 0 0.535010531 1 68 1 3.201192937 0 69 0 2.212792969 1 70 1 2.909777422 1 71 1 2.970150671 1 72 1 3.03715758 1 73 0 3.096913065 1 74 0 -1.044458606 1 75 1 3.480819693 0 76 1 3.777144016 1 77 1 2.78690566 1 78 1 3.454894124 0 79 1 1.998585854 1 80 0 2.329454742 1 

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!