r代写-AMA538
时间:2022-04-16
AMA538
Second Semester, 2021-2022
Mini computer project
Submit by 1700 on 22th April 2022
This assignment sheet has 1 question.
Your answer to this coursework will be assessed and your marks will contribute
5% to your total for the module. You should submit your answers in a single PDF
file through Blackboard platform by the time shown above. If you hand this
assignment late, a mark of 0 will be recorded, unless you make a case for leniency
which is accepted by the lecturer. If you have any technical issue, you are welcome
to consult the lecturer.
Question : The R Script “weibull.R” has a walkthrough on three esti-
mation methods namely maximum likelihood estimation (MLE), Bayesian
regression and graphical method on Weibull distributed data. By replicating
the work provided by the provided R Script, provide a proper analysis with
codes (either on a Word Documents/PDF document/Markdown and other
tools).
1. Generate two sets of simulated data using exponential distribution
(which is not going to use again afterward) and Weibull distribution,
examine their validity by checking their sample mean and variance (for
example, E(XWeibull) = λΓ(1 + 1/k) for f(x) =
k
λ
(x
λ
)k−1 exp (x/λ)k).
2. Fit the models with the methods shown in “weibull.R” using simulated
Weibull and Weibull regression models.
3. Fit the same set of data as above with MLE method and Bayesian
regression but using exponential regression model.
4. Provide the parameter estimates from the above fitted models (five in
total) in a table and comment on its accuracy.
5. Write a short summary in a few sentences(fewer than 5) on Akaike
information criterion (AIC; Akaike 1974) and leave-one-out information
criterion (looic; Vehtari et al. 2017). And comment on the goodness-
of-fit of the Weibull/exponential models.
1
References
Akaike, H., 1974: A new look at the statistical model identification. IEEE
transactions on automatic control, 19 (6), 716–723.
Vehtari, A., A. Gelman, and J. Gabry, 2017: Practical bayesian model eval-
uation using leave-one-out cross-validation and waic. Statistics and com-
puting, 27 (5), 1413–1432.
2