distreg: Bayesian distribution regression

Description Usage Arguments Value Examples

View source: R/Regression_Functions.R

Description

distreg draws randomly from the density of F(yo) at a threshold value yo

Usage

1
distreg(thresh, data0, MH = "IndepMH", ...)

Arguments

thresh

threshold value that is used to binarise the continuous outcome variable

data0

original data set with the first column being the continuous outcome variable

MH

metropolis-hastings algorithm to use; default:"IndepMH", alternative "RWMH"

...

any additional inputs to pass to the MH algorithm

Value

fitob a vector of fitted values corresponding to the distribution at threshold thresh

Examples

1
2
3
data0=faithful[,c(2,1)]; qnt<-quantile(data0[,1],0.25)
distob<- distreg(qnt,data0,iter = 102, burn = 2); 
plot(density(distob,.1),main="Kernel density plot")

bayesdistreg documentation built on May 1, 2019, 8:03 p.m.