Info_prior: Using prior information to calculate distribution of...

Description Usage Arguments Value Examples

View source: R/Info_prior.R

Description

You can use 'Info_prior' with any data frame.

Usage

1
Info_prior(x, y, laplace = 0)

Arguments

x

Prior information of predictors.

y

Prior information of responses.

laplace

A small correction to smooth categorical data.

Value

'apriori': Distribution of responses.

'numvar_dist': A list of distribution (mean and variance) of numeric predictors.

'catvar_conpro': A list of conditional probability of categorical predictors.

'var_names': Names of all predictors.

Examples

1
2
3
4
5
data(mood)
x=mood[,1:5]
y=mood[,6]
prior=Info_prior(x,y)  #Laplace=0 as default
prior

LiArAu/NaBa documentation built on Nov. 27, 2019, 9:28 p.m.