mu_sigmasqhat {genscore} | R Documentation |
Estimates the mu and sigma squared parameters from a univariate truncated normal sample.
Description
Estimates the mu and sigma squared parameters from a univariate truncated normal sample.
Usage
mu_sigmasqhat(x, mode, param1, param2, mu = NULL, sigmasq = NULL)
Arguments
x |
A vector, the data.
|
mode |
A string, the class of the h function.
|
param1 |
A number, the first parameter to the h function.
|
param2 |
A number, the second parameter (may be optional depending on mode ) to the h function.
|
mu |
A number, may be NULL . If NULL , an estimate will be given; otherwise, the value will be treated as the known true mu parameter and is used to calculate an estimate for sigmasq , if sigmasq is NULL .
|
sigmasq |
A number, may be NULL . If NULL , an estimate will be given; otherwise, the value will be treated as the known true sigmasq parameter and is used to calculate an estimate for mu , if mu is NULL .
|
Details
If both mu
and sigmasq
are provided, they are returned immediately. If neither is provided, the estimates are given as
[1/σ2,μ/σ2]={∑i=1nh(Xi)[Xi,−1][Xi,−1]⊤}−1{∑i=1n[h(Xi)+h′(Xi)Xi,−h′(Xi)]}.
If only sigmasq
is provided, the estimate for mu
is given as
∑i=1n[h(Xi)Xi−σ2h′(Xi)]/∑i=1nh(Xi).
If only mu
is given, the estimate for sigmasq
is given as
∑i=1nh(Xi)(Xi−μ)2/∑i=1n[h(Xi)+h′(Xi)(Xi−μ)].
Value
A vector that contains the mu
and the sigmasq
estimates.
[Package
genscore version 1.0.2.2
Index]