dbr {DBR}R Documentation

Discretised Beta Regression for Survey-Response Analysis

Description

Discretised Beta Regression for Survey-Response Analysis

Usage

dbr(
  formula
  , data
  , control = dbr.control()
  , yunique = NULL
  , wghts = rep(1, nrow(data))
)
dbr.control(
  nsmp = 100
  , nburnin = 50
  , estimate_left_buffer = FALSE
  , estimate_right_buffer = FALSE
  , buffer_max = 5.0
)

Arguments

formula

Standard R formula describing the response variable and predictors.

data

Data frame containing response and predictors as described in formula.

control

List of parameters for controlling the MCMC estimation.

yunique

Vector of values/levels that the response variable can assume. If not specified, this will be extracted from the data according to the formula.

wghts

Vector of weights to be applied during model estimation. Default is a uniform weight vector.

nsmp

Number of MCMC samples to collect, including the burnin phase.

nburnin

Number of initial MCMC samples to discard before calculating parameter estimates.

estimate_left_buffer

Boolean flag indicating whether to estimate a left buffer from the data.

estimate_right_buffer

Boolean flag indicating whether to estimate a right buffer from the data.

buffer_max

Maximum size of left/right buffer, only used if above flags are set to TRUE.

Value

An object of class dbr, which is a list containing the following fields:

formula

Same as input.

control

Same as input.

yunique

Same as input.

wghts

Same as input.

est

An internal object containing estimation results. Should not be accessed directly by user. Use summary and predict instead.

data

Same as input.

Author(s)

Mansour T.A. Sharabiani, Alireza S. Mahani

See Also

summary.dbr, predict.dbr

Examples


library("DBR")
data("pain")
est <- dbr(
  interference ~ severity + age
  , pain
  , control = dbr.control(
    nsmp = 50
    , nburnin = 25
  )
)


[Package DBR version 1.4.1 Index]