包含Cauchy位置, 局部最大值和甲虫数据模型三个部分

Exercises

3.5.1 Cauchy with unknown location.

Consider estimating the location parameter of a Cauchy distribution with a known scale parameter. The density function is

f(x;θ)=1π[1+(xθ)2],xR,θR.

Let 

X1,,Xn

 be a random sample of size 

n

 and 

(θ)

 the log-likelihood function of 

θ

 based on the sample. – Show that

(θ)=nlnπi=1nln[1+(θXi)2],(θ)=2i=1nθXi1+(θXi)2,(θ)=2i=1n1(θXi)2[1+(θXi)2]2,In(θ)=4nπx2dx(1+x2)3=n/2,

where 

In

 is the Fisher information of this sample. – Set the random seed as 

20180909

 and generate a random sample of size 

n=10

 with 

θ=5

. Implement a loglikelihood function and plot against 

θ

. – Find the MLE of 

θ

 using the Newton–Raphson method with initial values on a grid starting from 

10

 to 

30

 with increment 

0.5

. Summarize the results. – Improved the Newton–Raphson method by halving the steps if the likelihood is not improved. – Apply fixed-point iterations using 

G(θ)=α(θ)+θ

, with scaling choices of 

α{1,0.64,0.25}

 and the same initial values as above. – First use Fisher scoring to find the MLE for 

θ

, then refine the estimate by running Newton-Raphson method. Try the same starting points as above. – Comment on the results from different methods (speed, stability, etc.).

3.5.2 Many local maxima

Consider the probability density function with parameter 

θ

:

f(x;θ)=1cos(xθ)2π,0x2π,θ(π,π).

A random sample from the distribution is

x <- c(3.91, 4.85, 2.28, 4.06, 3.70, 4.04, 5.46, 3.53, 2.28, 1.96,
       2.53, 3.88, 2.22, 3.47, 4.82, 2.46, 2.99, 2.54, 0.52)
  • Find the the log-likelihood function of 
    θ

     

     based on the sample and plot it between 

    π

     

     and 

    π

     

    .

  • Find the method-of-moments estimator of 
    θ

     

    . That is, the estimator 

    θ~n

     

     is value of 

    θ

     

     with

    E(Xθ)=X¯n,

     

    where 

    X¯n

     

     is the sample mean. This means you have to first find the expression for 

    E(Xθ)

     

    .

  • Find the MLE for 
    θ

     

     using the Newton–Raphson method initial value 

    θ0=θ~n

     

    .

  • What solutions do you find when you start at 
    θ0=2.7

     

     and 

    θ0=2.7

     

    ?

  • Repeat the above using 200 equally spaced starting values between 
    π

     

     and 

    π

     

    . Partition the values into sets of attraction. That is, divide the set of starting values into separate groups, with each group corresponding to a separate unique outcome of the optimization.

3.5.3 Modeling beetle data

The counts of a floor beetle at various time points (in days) are given in a dataset.

beetles <- data.frame(
    days    = c(0,  8,  28,  41,  63,  69,   97, 117,  135,  154),
    beetles = c(2, 47, 192, 256, 768, 896, 1120, 896, 1184, 1024))

A simple model for population growth is the logistic model given by

dNdt=rN(1NK),

where 

N

 is the population size, 

t

 is time, 

r

 is an unknown growth rate parameter, and 

K

 is an unknown parameter that represents the population carrying capacity of the environment. The solution to the differential equation is given by

Nt=f(t)=KN0N0+(KN0)exp(rt),

where 

Nt

 denotes the population size at time 

t

.

  • Fit the population growth model to the beetles data using the Gauss-Newton approach, to minimize the sum of squared errors between model predictions and observed counts.
  • Show the contour plot of the sum of squared errors.
  • In many population modeling application, an assumption of lognormality is adopted. That is , we assume that 
    logNt

     

     are independent and normally distributed with mean 

    logf(t)

     

     and variance 

    σ2

     

    . Find the maximum likelihood estimators of 

    θ=(r,K,σ2)

     

     using any suitable method of your choice. Estimate the variance your parameter estimates.


EasyDue™ 支持PayPal, AliPay, WechatPay, Taobao等各种付款方式!

E-mail: easydue@outlook.com  微信:easydue


EasyDue™是一个服务全球中国留学生的专业代写公司
专注提供稳定可靠的北美、澳洲、英国代写服务
专注提供CS、统计、金融、经济、数据科学专业的作业代写服务