prior.ord: ~~function to do ... ~~

Usage Arguments Examples

Usage

1
prior.ord(Covs, betaprior, dcprior, c1prior, slopeprior = list("norm", 0, 0.1))

Arguments

Covs
betaprior
dcprior
c1prior
slopeprior

Examples

 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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
##---- Should be DIRECTLY executable !! ----
##-- ==>  Define data, use random,
##--	or do  help(data=index)  for the standard data sets.

## The function is currently defined as
function (Covs, betaprior, dcprior, c1prior, slopeprior = list("norm", 
    0, 0.1)) 
{
    mean.beta = betaprior[[2]]
    prec.beta = betaprior[[3]]
    lower.dc = dcprior[[2]]
    upper.dc = dcprior[[3]]
    lower.c1 = c1prior[[2]]
    upper.c1 = c1prior[[3]]
    Prior.beta = paste("d", betaprior[[1]], "(mean.beta,prec.beta)", 
        sep = "")
    Prior.dc = paste("d", dcprior[[1]], "(lower.dc, upper.dc)", 
        sep = "")
    Prior.c1 = paste("d", c1prior[[1]], "(lower.c1, upper.c1)", 
        sep = "")
    if (!is.null(Covs)) {
        mean.slope = slopeprior[[2]]
        prec.slope = slopeprior[[3]]
        Prior.slope = paste("d", slopeprior[[1]], "(mean.slope,prec.slope)", 
            sep = "")
    }
    out <- list(mean.beta = mean.beta, prec.beta = prec.beta, 
        Prior.beta = Prior.beta, lower.dc = lower.dc, upper.dc = upper.dc, 
        Prior.dc = Prior.dc, lower.c1 = lower.c1, upper.c1 = upper.c1, 
        Prior.c1 = Prior.c1)
    if (!is.null(Covs)) {
        out[[1 + length(out)]] = mean.slope
        names(out)[[length(out)]] = "mean.slope"
        out[[1 + length(out)]] = prec.slope
        names(out)[[length(out)]] = "prec.slope"
        out[[1 + length(out)]] = Prior.slope
        names(out)[[length(out)]] = "Prior.slope"
    }
    return(out)
  }

jservadio/TrialistNof1 documentation built on May 20, 2019, 2:08 a.m.