EMsimulation {EMSNM} | R Documentation |
Simulation For Estimation
Description
It simulates the experiments with given alpha, eta and sigma to verify the EMalgorithm
Usage
EMsimulation(eta, alpha, sigma, samplesize, expriments,
compact_flag = FALSE, C0 = 5, C1 = 2, C2 = 9)
Arguments
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 |
Value
alpha |
alpha estimated in simulation. |
eta |
eta estimated in simulation. |
sigma |
sigma estimated in simulation. |
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)
[Package EMSNM version 1.0 Index]