Description Usage Arguments Value Author(s) Examples
It simulates the experiments with given alpha, eta and sigma to verify the EMalgorithm
1 2 | EMsimulation(eta, alpha, sigma, samplesize, expriments,
compact_flag = FALSE, C0 = 5, C1 = 2, C2 = 9)
|
eta |
the true value of eta |
alpha |
the true value of alpha |
sigma |
the true value of sigma |
samplesize |
the size of sample |
expriments |
the times of experiments |
compact_flag |
if the value of eta is limited in a compact set, set it TRUE |
C0 |
the maximum of intercept of eta. |
C1 |
the minimum of the norm of slope of eta |
C2 |
the maximum of the norm of slope of eta |
alpha |
alpha estimated in simulation. |
eta |
eta estimated in simulation. |
sigma |
sigma estimated in simulation. |
Linsui Deng
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | #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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.