Description Usage Arguments Details Value
Estimates the mu and sigma squared parameters from a univariate truncated normal sample.
1 | mu_sigmasqhat(x, mode, param1, param2, mu = NULL, sigmasq = NULL)
|
x |
A vector, the data. |
mode |
A string, the class of the |
param1 |
A number, the first parameter to the |
param2 |
A number, the second parameter (may be optional depending on |
mu |
A number, may be |
sigmasq |
A number, may be |
If both mu
and sigmasq
are provided, they are returned immediately. If neither is provided, the estimates are given as
[1/σ^2,μ/σ^2]=(sum(h(Xi)*[Xi,-1][Xi,-1]'))^(-1) (sum([h(Xi)+h'(Xi)Xi, -h'(Xi)])).
If only sigmasq
is provided, the estimate for mu
is given as
sum(h(Xi)Xi-σ^2*h'(Xi))/sum(h(Xi)).
If only mu
is given, the estimate for sigmasq
is given as
sum(h(Xi)(Xi-μ)^2)/(sum(h(Xi)+h'(Xi)(Xi-μ))).
A vector that contains the mu
and the sigmasq
estimates.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.