Calculate Wald og Likelihood based (profile likelihood) confidence intervals

# S3 method for lvmfit
confint(
object,
parm = seq_len(length(coef(object))),
level = 0.95,
profile = FALSE,
curve = FALSE,
n = 20,
interval = NULL,
lower = TRUE,
upper = TRUE,
...
)

## Arguments

object lvm-object. Index of which parameters to calculate confidence limits for. Confidence level Logical expression defining whether to calculate confidence limits via the profile log likelihood if FALSE and profile is TRUE, confidence limits are returned. Otherwise, the profile curve is returned. Number of points to evaluate profile log-likelihood in over the interval defined by interval Interval over which the profiling is done If FALSE the lower limit will not be estimated (profile intervals only) If FALSE the upper limit will not be estimated (profile intervals only) Additional arguments to be passed to the low level functions

## Value

A 2xp matrix with columns of lower and upper confidence limits

## 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.

bootstrap{lvm}

Klaus K. Holst

## 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.5888514 1.026329confint(e,3)
#>          2.5 %    97.5 %
#> y~~y 0.5547589 0.9802276 ## Reduce Ex.timings
B <- bootstrap(e,R=50)
#> Warning: UNRELIABLE VALUE: One of the ‘future.apply’ iterations (‘future_lapply-1’) unexpectedly generated random numbers without declaring so. There is a risk that those random numbers are not statistically sound and the overall results might be invalid. To fix this, specify 'future.seed=TRUE'. This ensures that proper, parallel-safe random numbers are produced via the L'Ecuyer-CMRG method. To disable this check, use 'future.seed = NULL', or set option 'future.rng.onMisuse' to "ignore".B
#> Non-parametric bootstrap statistics (R=50):
#>
#>      Estimate     Bias         Std.Err      2.5 %        97.5 %
#> y     0.124504326  0.019136487  0.091432200 -0.048940002  0.294380917
#> y~x   1.061750034  0.006653642  0.094422581  0.907870490  1.231099705
#> y~~y  0.767493210 -0.003652062  0.104073510  0.572331738  0.960123567
#>