Question

In: Statistics and Probability

(Be sure to paste the R Console Output and code!!!) Using the following data and R,...

(Be sure to paste the R Console Output and code!!!) Using the following data and R, write a brief paragraph about whether the in-home treatment is equally effective as the out-of-home treatment for two separate groups. Here are the data. The outcome variable is level of anxiety after treatment on a scale from 1 to 10.

In-Home Treatment

Out-of-Home Treatment

3

7

4

6

1

7

1

8

1

7

3

6

3

5

6

6

5

4

1

2

4

5

5

4

4

3

4

6

3

7

6

5

7

4

7

3

7

8

8

7

Solutions

Expert Solution


Related Solutions

Run the following R code (copy and paste) to create some data: out1 <- rep( c(0,0,1),...
Run the following R code (copy and paste) to create some data: out1 <- rep( c(0,0,1), 3 ) out2 <- rep( c(1,0,1), 3 ) counts <- c(18,17,15,20,10,20,25,13,12) This is a variation on the data in the first example on the “glm” help page in R. The counts variable is our response variable and will be modeled as a Poisson variable, the out1 predictor variable will measure the difference between outcomes 2 (baseline) and 3, and out2 will measure the difference...
Use R to answer the following question. Copy and paste the code and answer from R...
Use R to answer the following question. Copy and paste the code and answer from R into your paper. On the average,five cars arrive at a particular car wash every hour. Let X count the number of cars that arrive from 10 AM to 11 AM. Then X ∼pois(lambda = 5). Also, μ = σ2 = 5.  What is the probability that no car arrives during this period?  Suppose the car wash above is in operation from 8AM...
SOLVE USING R. COPY AND PASTE R INPUT AND OUTPUT. Fifteen turkey hens were randomly assigned...
SOLVE USING R. COPY AND PASTE R INPUT AND OUTPUT. Fifteen turkey hens were randomly assigned to three groups of five. One group was given diet A, the second group diet B, and the third group diet C. We wish to know if there is a difference in the weight of eggs produced by the birds on these diets, and if so, which diet results in the largest eggs. The data are the mean weights of ten eggs from each...
R studio questions Write up your answers and paste the R code Copy and paste all...
R studio questions Write up your answers and paste the R code Copy and paste all plots generated. First create a sample drawn from a normal random variable. R has many distributions for which you can get probabilities and draw random numbers. We are going to use the normal. Go to help in R and type in rnorm. You will see a write up for functions associated with the normal distribution. dnorm is the density; pnorm is the probability distribution...
Using R Studio Use the two iid samples. (You can copy and paste the code into...
Using R Studio Use the two iid samples. (You can copy and paste the code into R). They both come from the same normal distribution. X = c(-0.06, 1.930, 0.608 -0.133,0.657, -1.284, 0.166, 0.963, 0.719, -0.896) Y = c(0.396, 0.687, 0.809, 0.939, -0.381, -0.042, -1.529, -0.543, 0.758, -2.574, -0.160, -0.713, 0.311, -0.515, -2.332, -0.844, -0.942, 0.053, 0.066, 0.942, -0.861, -0.186, -0.947, -0.110, 0.634, 2.357, 0.201, -0.428, -1.661, 0.395) (a) Report 95% confidence interval for the mean of X. Should we...
Answer IN R CODE to get the following. Using the data below, Create a scatterplot of...
Answer IN R CODE to get the following. Using the data below, Create a scatterplot of y vs x Fit a simple linear regression model using y as the response and plot the regression line (with the data) Test whether x is a significant predictor and create a 95% CI around the slope coefficient. Report and interpret the coefficient of determination. For x=20, create a CI for E(Y|X=20). For x=150, can you use the model to estimate E(Y|X=150)? Discuss. Does...
Part 2– R work (must be done in R) Copy and paste your R code and...
Part 2– R work (must be done in R) Copy and paste your R code and output into a word document, along with your written answers to the questions, and upload to Canvas.   Follow these instructions to import the necessary dataset: Before opening the dataset needed for this problem, you’ll need to call the “car”package.  Run the following line of code: > library(car) Now you can import the “Prestige” dataset and use it to answer the question below. Name the data...
You have the following output on the R console: > head(Salaries) Gender Salary 1 Male 43000...
You have the following output on the R console: > head(Salaries) Gender Salary 1 Male 43000 2 Female 45000 3 Male 95000 4 Female 88000 5 Male 76000 6 Female 55000 Your manager wants you to write some R code that will test whether there is a difference in the mean salary between Males and Females. a) How would you use R to store vectors that contain only salaries by gender? b) If x represents the vector of Male salaries...
You have the following output on the R console: > head(Salaries) Gender Salary 1 Male 43000...
You have the following output on the R console: > head(Salaries) Gender Salary 1 Male 43000 2 Female 45000 3 Male 95000 4 Female 88000 5 Male 76000 6 Female 55000 Your manager wants you to write some R code that will test whether there is a difference in the mean salary between Males and Females. a) How would you use R to store vectors that contain only salaries by gender? b) If x represents the vector of Male salaries...
The Book of R (Question 20.2) Please answer using R code. Continue using the survey data...
The Book of R (Question 20.2) Please answer using R code. Continue using the survey data frame from the package MASS for the next few exercises. The survey data set has a variable named Exer , a factor with k = 3 levels describing the amount of physical exercise time each student gets: none, some, or frequent. Obtain a count of the number of students in each category and produce side-by-side boxplots of student height split by exercise. Assuming independence...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT