# EMsimulation: Simulation For Estimation In EMSNM: EM Algorithm for Sigmoid Normal Model

## Description

It simulates the experiments with given alpha, eta and sigma to verify the EMalgorithm

## Usage

 ```1 2``` ```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.

Linsui Deng

## Examples

 ``` 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) ```

EMSNM documentation built on May 2, 2019, 1:41 p.m.