getLogModelPrior: Get the log prior probability for a model

Description Usage Arguments Details Value Author(s) Examples

Description

The “exponential” prior assumes f(d) ~ exp(-2 * sum(d_j)) which penalizes models with many degrees of freedom regardless of linear (d_j = 1) or smooth (d_j > 1) inclusion of covariates.

Usage

1
2
3
  getLogModelPrior(config,
    type = c("flat", "exponential", "independent", "dependent", "dep.linear"),
    modelData)

Arguments

config

the model configuration vector, or a matrix of model configurations in rows. There may be additional elements to the right, e.g. the log marginal likelihood column/value, if modelData is provided. These are then ignored internally.

type

either “flat” (default), “exponential”, “independent” or “dependent”. See the details.

modelData

the model setup from modelData

Details

The “independent” prior (as the exponential prior) that the different covariates are independent, f(d) = prod(f(d_j)), where f(d_j) is built hierarchically: The prior probability for exclusion is 0.5, thus f(0)=0.5. Given inclusion, the other half is split up uniformly between all possible degrees of freedom larger than 0.

The “dependent” prior imposes a uniform distribution for the number of included variables. The “position” of the included variables, i.e. which of the variables are included, is uniformly distributed on all possible configurations. The degrees of freedoms are then conditionally independent and uniformly distributed on the respective possible values.

The “dep.linear” prior is similar, but imposes a uniform distribution for the number of smoothly included variables conditional on inclusion. The “position” of the (smoothly) included variables, i.e. which of the (linearly included) variables are included (as splines), is uniformly distributed on the possible configurations at both steps. The spline variance parameters are then conditionally independent and uniformly distributed on the respective possible values. This leads to a fixed prior probability of linear inclusion of 1/4.

Value

the (unnormalized) log prior probability

Author(s)

Daniel Sabanes Bove daniel.sabanesbove@ifspm.uzh.ch

Examples

1
2
3
4
5
6
7
8
9
## artificial configuration:
config <- c(a=0L, b=1L, c=3L, d=0L)

## get log prior probs:
getLogModelPrior(config=config,
                 type="flat")

getLogModelPrior(config=config,
                 type="exponential")

hypergsplines documentation built on May 2, 2019, 6:14 p.m.