Performs Parametric Bootstrap for Standard Error Approximation
boot.se.RdPerforms a parametric bootstrap by producing B bootstrap samples for the parameters in the specified mixture model.
Arguments
- em.fit
An object of class
mixEM. The estimates produced inem.fitwill be used as the parameters for the distribution from which we generate the bootstrap data.- B
The number of bootstrap samples to produce. The default is 100, but ideally, values of 1000 or more would be more acceptable.
- arbmean
If FALSE, then a scale mixture analysis can be performed for
mvnormalmix,normalmix,regmix, orrepnormmix. The default is TRUE.- arbvar
If FALSE, then a location mixture analysis can be performed for
mvnormalmix,normalmix,regmix, orrepnormmix. The default is TRUE.- N
An n-vector of number of trials for the logistic regression type
logisregmix. If NULL, thenNis an n-vector of 1s for binary logistic regression.- ...
Additional arguments passed to the various EM algorithms for the mixture of interest.
Value
boot.se returns a list with the bootstrap samples and standard errors for the mixture of interest.
Examples
## Bootstrapping standard errors for a regression mixture case.
data(NOdata)
attach(NOdata)
set.seed(100)
em.out <- regmixEM(Equivalence, NO, arbvar = FALSE)
#> number of iterations= 23
out.bs <- boot.se(em.out, B = 10, arbvar = FALSE)
#> number of iterations= 14
#> number of iterations= 7
#> number of iterations= 12
#> number of iterations= 63
#> number of iterations= 10
#> number of iterations= 9
#> number of iterations= 19
#> number of iterations= 9
#> number of iterations= 10
#> number of iterations= 9
out.bs
#> $lambda
#> [,1] [,2] [,3] [,4] [,5] [,6] [,7]
#> [1,] 0.4851113 0.4697443 0.596572 0.4959446 0.5205063 0.59324 0.4924732
#> [2,] 0.5148887 0.5302557 0.403428 0.5040554 0.4794937 0.40676 0.5075268
#> [,8] [,9] [,10]
#> [1,] 0.4883865 0.5253512 0.5085208
#> [2,] 0.5116135 0.4746488 0.4914792
#>
#> $lambda.se
#> [1] 0.04398025 0.04398025
#>
#> $beta
#> [,1] [,2] [,3] [,4] [,5] [,6]
#> [1,] 0.56560307 0.57804415 0.54823185 0.60273755 0.57483259 0.57004183
#> [2,] 0.08681471 0.07690188 0.09581534 0.07634211 0.07890199 0.08066379
#> [3,] 1.25511339 1.26317671 1.23389408 1.29143500 1.23384677 1.26902566
#> [4,] -0.08826143 -0.08951039 -0.07887580 -0.11040133 -0.08165614 -0.09158025
#> [,7] [,8] [,9] [,10]
#> [1,] 0.56143406 0.56872406 0.57677339 0.54933602
#> [2,] 0.08576481 0.07949269 0.07837805 0.09058422
#> [3,] 1.24948630 1.24164986 1.24691726 1.25876179
#> [4,] -0.09137644 -0.08216474 -0.08399838 -0.08860009
#>
#> $beta.se
#> [,1] [,2]
#> [1,] 0.015631449 0.01753614
#> [2,] 0.006509545 0.00880769
#>
#> $sigma
#> [,1] [,2] [,3] [,4] [,5] [,6]
#> [1,] 0.03470704 0.03252508 0.03526343 0.03421735 0.03179572 0.03252541
#> [,7] [,8] [,9] [,10]
#> [1,] 0.03406565 0.03067507 0.03347432 0.03049482
#>
#> $sigma.se
#> [1] 0.001648412
#>