Calculate Wald og Likelihood based (profile likelihood) confidence intervals
Arguments
- object
lvm-object.- parm
Index of which parameters to calculate confidence limits for.
- level
Confidence level
- profile
Logical expression defining whether to calculate confidence limits via the profile log likelihood
- curve
if FALSE and profile is TRUE, confidence limits are returned. Otherwise, the profile curve is returned.
- n
Number of points to evaluate profile log-likelihood in over the interval defined by
interval- interval
Interval over which the profiling is done
- lower
If FALSE the lower limit will not be estimated (profile intervals only)
- upper
If FALSE the upper limit will not be estimated (profile intervals only)
- ...
Additional arguments to be passed to the low level functions
Details
Calculates either Wald confidence limits: $$\hat{\theta} \pm z_{\alpha/2}*\hat\sigma_{\hat\theta}$$ or profile likelihood confidence limits, defined as the set of value \(\tau\): $$logLik(\hat\theta_{\tau},\tau)-logLik(\hat\theta)< q_{\alpha}/2$$
where \(q_{\alpha}\) is the \(\alpha\) fractile of the \(\chi^2_1\) distribution, and \(\hat\theta_{\tau}\) are obtained by maximizing the log-likelihood with tau being fixed.
See also
bootstrap{lvm}
Examples
m <- lvm(y~x)
d <- sim(m,100)
e <- estimate(lvm(y~x), d)
confint(e,3,profile=TRUE)
#> 2.5 % 97.5 %
#> y~~y 0.5914658 1.030886
confint(e,3)
#> 2.5 % 97.5 %
#> y~~y 0.5572218 0.9845795
## Reduce Ex.timings
B <- bootstrap(e,R=50)
B
#> Non-parametric bootstrap statistics (R=50):
#>
#> Estimate Bias Std.Err 2.5 % 97.5 %
#> y 0.119837374 -0.006845587 0.086472357 -0.040118667 0.289097490
#> y~x 1.052101422 0.006742617 0.072663722 0.919824486 1.169691110
#> y~~y 0.770900690 -0.014345058 0.098669023 0.581444406 0.971146502
#>
