dataLD: Transform formula to LaplacesDemon data.

Description Usage Arguments Details Value References Examples

Description

Transform a formula of binary regression model in data to be used with LaplacesDemon function.

Usage

1

Arguments

formula

an object of class 'formula' (or one that can be coerced to that class): a symbolic description of the model to be fitted.

link

the link function to be used. The options are: 'logit', 'probit' 'cloglog', 'Aranda-Ordaz', 'Weibull', 'CWeibull', 'Stukel', 'Prentice'.

data

an optional data frame, list or environment (or object coercible by 'as.data.frame' to a data frame) containing the variables in the model. If not found in 'data', the variables are taken from 'environment(formula)'.

subset

an optional vector specifying a subset of observations to be used in the fitting process.

Details

It is a function to facilitate de use of LaplacesDemon function. Transform a formula of binary regression model in data to be used with LaplacesDemon function, and suggest an command to run the LaplacesDemon.

Value

J

number of covariates.

mon.names

name of the variable to monitored.

y

binary response variable.

X

covariates of the model.

parm.names

name of the parameters.

References

Statisticat, LLC. (2013). LaplacesDemon: Complete Environment for Bayesian Inference. CRAN. R package version 13.03.04. http://cran.r-project.org/web/packages/LaplacesDemon/index.html

Examples

1
2
3
4
  set.seed(666)
  x <- rnorm(0,1)
  y <- rbern(length(x),pnorm(0.5+2*x))
  dataLD(y ~ x, "cloglog")

dnzmarcio/binreg documentation built on May 15, 2019, 9:41 a.m.