distreg.Rd
distreg
draws randomly from the density of F(yo) at a threshold value yo, i.e. the
distribution function at a threshold
distreg(thresh, data0, MH = "IndepMH", ...)
thresh | threshold value that is used to binarise the outcome variable |
---|---|
data0 | original data set with the first column being the outcome variable |
MH | Metropolis-Hastings algorithm to use; default:"IndepMH", alternative "RWMH" |
... | any additional inputs to pass to the MH algorithm |
fitob a vector of fitted values corresponding to the distribution at threshold thresh
data0=faithful[,c(2,1)]; qnt<-quantile(data0[,1],0.25) distob<- distreg(qnt,data0,iter = 102, burn = 2);#> IndepMH algorithm successful. Acceptance ratio = 0.5392157