A few days ago I asked a question which had a programming error, I already corrected it and I bring it to you again. By generating $n=1,000,000$ of random data with normal distribution ($\mu=35, \sigma=4$) and calculating its estimators by MLE and MME. First load the library, I generate my random data and save it to a vector
library(EnvStats)
rnorm(1000000, 35, 4)
c2<-rnorm(1000000, 35, 4)
To get the estimators use
enorm(c2, method = "mle")
and I get the following:
Results of Distribution Parameter Estimation
--------------------------------------------
Assumed Distribution: Normal
Estimated Parameter(s): mean = 35.00419
sd = 4.00252
Estimation Method: mle/mme
Data: c2
Sample Size: 1000000
My first question is, why does the "mle / mme" appear? In this case, is it the same to calculate the estimator by one of these two methods? My exercise asks me to use both methods to choose an unbiased estimator, what should I do?
If I do the same this time for a uniform distribution this time if I can calculate two estimators by both methods:
runif(1000000, 50000,100000)
c<-runif(1000000, 50000,100000)
eunif(c, method = "mle")
eunif(c, method = "mme")
Results of Distribution Parameter Estimation
--------------------------------------------
Assumed Distribution: Uniform
Estimated Parameter(s): min = 50000.03
max = 99999.99
Estimation Method: mle
Data: c
Sample Size: 1000000
Results of Distribution Parameter Estimation
--------------------------------------------
Assumed Distribution: Uniform
Estimated Parameter(s): min = 49980.71
max = 99988.77
Estimation Method: mme
Data: c
Sample Size: 1000000
here I have a couple of doubts. If I must choose unbiased, the MLE estimator appears to be non-unbiased, am I correct? My second question is, having these two estimators, is there a function in R to calculate its MSE?
R
package, so please show us what you used. Also, have you read the documentation for that function? $\endgroup$mle/mme
. (2) For estimation of the boundaries of a uniform distribution the MLE and MLE are not the same. A slightly simpler case is to estimate $\theta$ of $\mathsf{Unif}(0,\theta)$. The MLE is the maximum observation $X_{(n)},$ but it is biased (too small). the unbiased version is $\frac{n+1}{n}X_{(10)},$ which UMVUE. By contrast the MME is $2\bar X,$ which has a larger variance than either of the others. $\endgroup$