Example of MLE Computations, using R
Example of MLE Computations, using R
First of all, do you really need R to compute the MLE? Please note that MLE in many cases have explicit formula. Second of all, for some common distributions even though there are no explicit formula, there are standard (existing) routines that can compute MLE. Example of this catergory include Weibull distribution with both scale and shape parameters, logistic regression, etc. If you still cannot find anything usable then the following notes may be useful.
We start with a simple example so that we can cross check the result. Suppose the observations X1, X2, ..., Xn are from N (?, 2) distribution (2 parameters: ? and 2).
The log likelihood function is
-
(Xi - ?)2 22
-
1/2 log 2
-
1/2 log 2
+
log
dXi
(actually we do not have to keep the terms -1/2 log 2 and log dXi since they are constants.
In R software we first store the data in a vector called xvec
xvec output1 sqrt( diag(solve(output1$hessian)) )
[1] 1.273182 6.066413
> 11.34694/7
[1] 1.620991
> sqrt(11.34694/7)
[1] 1.273182
# st. dev. of mean checks out
> optim( theta 2*( fn(c(2,6.37^2)) - fn(c(2,mleSigma^2)) ) [1] 3.841142
So the 95% confidence interval for is (approximately) [2.1635, 6.37] We also see that the 95% confidence Interval for 2 is
[2.16352, 6.372]
sort of invariance property (for the confidence interval). We point out that the confidence interval from the Wald construction do
not have invariance property. The Wald 95% confidence interval for sigma is (using formula we derived
in the midterm exam)
5
................
................
In order to avoid copyright disputes, this page is only a partial summary.
To fulfill the demand for quickly locating and searching documents.
It is intelligent file search solution for home and business.
Related download
- math 121 homework 7 notes on selected problems
- numerical integration another approach
- latex math mode
- 1 sqrt 10 1 011010100000100 2 sqrt 10 10 1
- on fast convergence of proximal algorithms for sqrt lasso
- mipt spring camp 2016 day 2 theme sqrt decomposition
- in 1 this is a basic tutorial introducing you to sympy
- preconditions and postconditions
- evaluation of the complete elliptic integrals by
- square roots via newton s method
Related searches
- example of biography of yourself
- example of philosophy of education
- example of state of purpose
- example of type of essays
- example of recognition of coworker
- example of summary of an article
- example of order of importance
- example of philosophy of teaching statement
- example of sum of squares
- example of introduction of yourself
- example of transcript of records
- example of letter of request