# PMP: Posterior model probability In TBFmultinomial: TBF Methodology Extension for Multinomial Outcomes

## Description

This function computes the posterior probability of all candidate models

## Usage

 ```1 2 3``` ```PMP(fullModel = NULL, candidateModels = NULL, data = NULL, discreteSurv = TRUE, modelPrior = NULL, method = "LEB", prior = "flat", package = "nnet", maxit = 150, numberCores = 1) ```

## Arguments

 `fullModel` formula of the model including all potential variables `candidateModels` Instead of defining the full model we can also specify the candidate models whose deviance statistic and d.o.f should be computed `data` the data frame with all the information `discreteSurv` Boolean variable telling us whether a 'simple' multinomial regression is looked for or if the goal is a discrete survival-time model for multiple modes of failure is needed. `modelPrior` optionaly the model priors can be computed before if candidateModels is different from NULL. `method` tells us which method for the definition of g should be used. Possibilities are: `LEB`, `GEB`, `g=n`, `hyperG`, `ZS`, `ZSadapted` and `hyperGN` `prior` should a dependent or a flat prior be used on the model space? Only needed if `method = `GEB``. `package` Which package should be used to fit the models; by default the `nnet` package is used; we could also specify to use the package 'VGAM' `maxit` Only needs to be specified with package `nnet`: maximal number of iterations `numberCores` How many cores should be used in parallel?

## Value

an object of class `TBF.ingredients`

Rachel Heyard

## Examples

 ``` 1 2 3 4 5 6 7 8 9 10 11``` ```# extract the data: data("VAP_data") # the definition of the full model with three potential predictors: FULL <- outcome ~ ns(day, df = 4) + gender + type + SOFA # here we define time as a spline with 3 knots # computation of the posterior model probabilities: test <- PMP(fullModel = FULL, data = VAP_data, discreteSurv = TRUE, maxit = 150) class(test) ```

TBFmultinomial documentation built on May 2, 2019, 2:11 p.m.