Question: 5. Apply a RW1 prior in a general additive model (Section 10.6.2) for the binomial taxoplasmosis data. For identifiability in a model including the intercept
5. Apply a RW1 prior in a general additive model (Section 10.6.2) for the binomial taxoplasmosis data. For identifiability in a model including the intercept the smooth must be centred.
The code is then
![model (for (i in 1:n) {y[i] #prior on smooth ~ dbin (p[i],](https://dsd5zvtm8ll6.cloudfront.net/images/question_images/1730/9/7/4/580672c9374d63141730974371713.jpg)
Obtain the number of distinct values (M) from the dataset and also the categories O[i ](∈ 1, . . . , M) for each observation. How does the coding need to change in the line for logit(p[i ]) if the intercept is omitted? For the gamma parameters
(a,
b) in the prior on the precision try a = b = 0.5 and a = 2, b = 0.5. How do the smooths obtained under either case compare to the cubic spline in Figure 10.1 in terms of fit and precision (complexity)?
Finally repeat the analysis using an RW2 prior for f [t].
model (for (i in 1:n) {y[i] #prior on smooth ~ dbin (p[i], N[i]) S[i] -mean (S[]) logit (p[i])
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
