Question: 1 Combining comparison with linear predictor Use the data at This gives mussel weight as a function of age; there are two locations given. Use

1 Combining comparison with linear predictor

Use the data at

This gives mussel weight as a function of age; there are two locations given. Use only frequentist methods here, so fit using lm, and use predict for confidence intervals and prediction intervals. Uncertainty is measured classically, by using confidence intervals for estimating reasonable values for unknown parameters.

First fit a regression model which just compares the average weight at the two locations, formulating the population comparison explicitly as a regression model.

Write down the exact model equation with parameters and variables clearly identified.

If the data is regarded as a sample from the locations, is there evidence that the two locations have different population averages? Quantify your answer to this question.

Why could this analysis be misleading?

Compare this to the result of a two-sample test, such as we studied in Math 462. Is there any difference?

Now include age into the model, since weight increases with age. Model weight as a linear function of age and location. Comparing two mussels of similar age, is there evidence that the expected weights differ? Quantify your answer.

Predict the weight of a new individual of age 4 at location 2. Given an interval that the weight is likely to fall in. Predict the expected weight of an individual of age 4 at location 2. Given an interval that the weight is likely to fall in.

2 Bayesian regression models

Repeat the above using the Bayesian framework. Use \texttt{stan_glm} to fit linear models, and the posterior distribution to assess uncertainty in parameter values.

First use the default prior values assumed by \texttt{stan_glm}. Repeat the analysis assuming that past information has led you to believe that the average difference between the two locations in weight is around 0 0.7. How does this prior information change your answers to the above?

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 Mathematics Questions!