llbayesireg: The L-Logistic Bayesian Regression

Description Usage Arguments Details Value Author(s) Source References Examples

Description

Function to estimate a L-Logistic regression model with median and precision regression structures.

Usage

1
llbayesireg(y,X,W,niter=1000,chains=1,burn=floor(niter/2),jump=1)

Arguments

y

Object of class vector, with the response.

X

Object of class matrix, with the variables for modelling the meadian. The default is NULL.

W

Object of class matrix, with the variables for modelling the presision. The default is NULL.

niter

A positive integer specifying the number of iterations for each chain. The default is 1000.

chains

A positive integer specifying the number of Markov chains. The default is 1.

burn

A positive integer specifying the period sampling (known as the burn-in). The default is niter/2.

jump

A positive integer specifying the period for saving samples. The default is 1.

Details

See https://cran.r-project.org/web/packages/llogistic/llogistic.pdf.

Value

Object of the class matrix, if the user does not provide arguments X and W, with:

object

Object of "fitll".

betas

Object of class matrix with the samples of regression coeficient related to median.

deltas

Object of class matrix with the samples of regression coeficient related to precision parameter.

sample.m

Object of class matrix with the samples of median.

sample.phi

Object of class matrix with the samples of precision parameter.

Object of the class matrix, if the user provide arguments X and W, with:

object

Object of "fitll".

betas

Object of class matrix with the samples of regression coeficient related to median.

deltas

Object of class matrix with the samples of regression coeficient related to precision parameter.

sample.m

Object of class matrix with the samples of median.

sample.phi

Object of class matrix with the samples of precision parameter.

pred

Object of class matrix with predicte vaules.

q

The number of columns of X.

d

The number of columns of W.

Author(s)

Sara Alexandre Fons<c3><aa>ca saralexandre@alu.ufc.br, Rosineide Fernando da Paz rfpaz2@gmail.com, Jorge Lu<c3><ad>s Baz<c3><a1>n

Source

The L-Losgistic distribution was introduced by Tadikamalla and Johnson (1982), which refer to this distribution as Logit-Logistic distribution. Here, we have a new parameterization of the Logit-Logistic with the median as a parameter.

References

Paz, R.F., Balakrishnan, N and Baz<c3><a1>n, J.L. (2018). L-Logistic Distribution: Properties, Inference and an Application to Study Poverty and Inequality in Brazil.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# Modelation the coeficient with generated data

library(llbayesireg)
library(llogistic)

# Number of elements to be generated

n=50

# Generated response

bin=2005
set.seed(bin)
y=rllogistic(n,0.5, 2)

fitll = llbayesireg(y, niter=100, jump=10)

m.hat=mean(fitll$sample.m); m.hat
phi.hat=mean(fitll$sample.phi); phi.hat

 
# Modelation the coeficient with real data
library(llbayesireg)

data("Votes","MHDI")

y = Votes[,4]
X = MHDI

fitll = llbayesireg(y,X)

summary(fitll$object, pars = c("beta","delta"), probs = c(0.025,0.975))

plot(fitll$betas[,1,1], type = "l")
 

llbayesireg documentation built on May 1, 2019, 9:13 p.m.