代做STAT 4620/5620 WINTER 2024 Assignment 4代写Processing
- 首页 >> C/C++编程STAT 4620/5620 WINTER 2024
Assignment 4: Due Thursday March 22 2024
1. The following questions explore the fundamentals of nonparametric statis- tics:
(a) [3] Describe smoothing and give two examples of popular smoothers.
(b) [2] Consider the generalized additive model (GAM) framework. What is
the most significant departure from the GLM framework? (c) [3] Explain how model estimation proceeds for GAMs.
(d) [4] Suppose that you find yourself in a situation where both a GLM and a GAM initially seem appropriate for your data. Explain the criteria you would use to determine which of the two methods to recommend.
2. This question re-examines the hubble data.
(a) [6] Fit the model:
Vi = f(Di ) + ϵi
to the Hubble data, where f is a smooth function and the ϵi are i.i.d. N(0,σ2 ). Does a straight line model appear to be most appropriate? How would you interpret the best fitting model?
(b) [4] Examine appropriate residual plots and refit the model with more appropriate distributional assumptions. How are your conclusions from part (a) modified?
3. Read and provide a one page summary of the lme4 documentation. [8]
4. The data frame. Gun (library nlme) is from a trial examining methods for fir - ing naval guns. Two firing methods were compared, with each of a number of teams of 3 gunners; the gunners in each team were matched to have similar physique (Slight, Average, Heavy). The response variable rounds is rounds fired per minute, and there are 3 explanatory factor variables, Physique (levels Slight, Medium and Heavy); Method (levels M1 and M2) and Team with 9 levels. The main interest is in determining which method and/or physique results in the highest firing rate and in quantifying team- to-team variability in firing rate.
(a) [2] Identify which factors should be treated as random and which as fixed, in the analysis of these data.
(b) [4] Write out a suitable mixed model as a starting point for the analysis of these data.
(c) [6] Analyse the data using lme in order to answer the main questions of interest and report your conclusions.
5. The data frame pcod (library sdmTMB) contains Pacific cod (Gadus macro- cephalus) trawl survey data from Queen Charlotte Sound, British Columbia, Canada.
(a) [4] Fit a spatial model to these data that contains a main effect of depth as as penalized smoother, a spatial random field, and Tweedie observa- tion error. This effort will require that you create a mesh using spatial coordinates X and Y, which are UTM coordinates in kilometres.You can take the minimum allowed distance between mesh vertices to be 10 kilometres and use the log link. Provide a plot of the mesh.
(b) [4] Use the predict method with the newdata argument to predict on a new data frame with any locations and values for the predictor columns (e.g., a 2x2 km grid). Show a basic plot of the estimated spatial random field.
(c) [4] Extend this spatial model to be a spatiotemporal one.