File: gmci.default.R

package info (click to toggle)
r-cran-ctmcd 1.4.1-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 1,384 kB
  • sloc: cpp: 183; ansic: 19; makefile: 2
file content (25 lines) | stat: -rw-r--r-- 765 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
gmci.default <-
  function (gm, alpha, eps = 1e-04, cimethod= "Direct", expmethod = "PadeRBS", ...) 
  {
    if (gm$method == "Expectation-Maximization Algorithm") {
      if(cimethod=="SdR"){
        limits = ciEMSdR(gm, alpha, eps, expmethod)
      }
      if(cimethod=="BS"){
        limits = ciEMBS(gm, alpha, eps, expmethod)
      }
      if(cimethod=="Direct"){
        limits = ciEMoFI(gm, alpha, eps, expmethod)
      }
      limits$method = "Wald Confidence Interval"
    }
    if (gm$method == "Gibbs Sampler") {
      limits = ciGS(gm, alpha)
      limits$method = "Equal Tailed Credibility Interval"
    }
    limits$par = gm$par
    limits$alpha = alpha
    limits$call = match.call()
    class(limits) = "gmci"
    limits
  }