prob.creator {ContRespPP}R Documentation

Probability Matrix Creator.

Description

prob.creator creates a matrix of probabilities of encountering factor levels to support construction of input for gibbs.sampler, which uses the Bayesian Mission Mean approach to analysis.

Usage

prob.creator(
  num.factors,
  num.factor.levels,
  likelihood.encountering,
  print.result = FALSE
)

Arguments

num.factors

Number of factors in the model (e.g., factor \alpha_i with levels i=1,2 is 1 factor). Input for num.factors should be a single number.

num.factor.levels

Number of levels for each factor (e.g., factor \alpha_i with i=1,2 has 2 levels). Input for num.factor.levels may be a vector, a matrix, or a dataframe.

likelihood.encountering

The probability of seeing each level of each factor (e.g., if the factor levels for \alpha_i are equally likely, then the probabilities would be c(1/2, 1/2)). The probabilities for each factor should sum to one. Input for likelihood.encountering may be a vector, a matrix, or a dataframe.

print.result

Displays final probability matrix.

Details

The ANOVA model includes main effects and two-way interactions. Priors on model parameters are assumed to be independent of each other; beta is then defined as the set of model parameters, which is multivariate normal.

Value

Returns a matrix with two columns, one with the factor number and the other with the likelihoods of encountering.


[Package ContRespPP version 0.4.2 Index]