EM_result_sort {EMSNM}R Documentation

Sort Parameter

Description

Since the number of subgroup types is always beyond 1, the order of subgroup may be different, we can sort them in this function.

Usage

EM_result_sort(EMsimulation_result_alpha, EMsimulation_result_eta)

Arguments

EMsimulation_result_alpha

alpha estimated by bootstrap method.

EMsimulation_result_eta

eta estimated by bootstrap method.

Value

alpha

sorted alpha estimated by bootstrap method.

eta

sorted eta estimated by bootstrap method.

Author(s)

Linsui Deng

Examples

#parameter initialization
etasize <- 2
classsize <- 2
alphasize <- 3
samplesize <- 100
expriments <- 30
  
etatest <- matrix(c(1,1,
                    0,0),etasize,classsize)

alphatest <- matrix(c(1,0,2,
                      4,3,5),alphasize,classsize)
sigmatest <- 0.5

#test of EMsimulation
EMsimulation_result <- EMsimulation(eta=etatest,alpha=alphatest,sigma=sigmatest,
                            samplesize=samplesize,expriments=expriments,
                            compact_flag=TRUE,C0=5,C1=0.5,C2=5)
                            
#test of EM_result_sort
EMsimulation_result_sort <- EM_result_sort(EMsimulation_result$alpha,
                                            EMsimulation_result$eta)

[Package EMSNM version 1.0 Index]