wbart (BART) returns negative y although I don't have negative values

19 views Asked by At

Code: 

data <- data
x <-as.matrix(data[, c(1,2,3,4)])
y <- as.matrix(data[, c(5)])
head(cbind(x,y))

#BART
set.seed(99)
nd <-50
burn <-200
post <-wbart(x,y, nskip = burn, ndpost = nd)

results Results:

post <-wbart(x,y, nskip = burn, ndpost = nd) *****Into main of wbart *****Data: data:n,p,np: 365, 4, 0 y1,yn: -239.336986, -172.336986 x1,x[n*p]: 480.000000, 2.000000 *****Number of Trees: 200 *****Number of Cut Points: 100 ... 71 *****burn and ndpost: 10, 5 *****Prior:beta,alpha,tau,nu,lambda: 2.000000,0.950000,10.553569,3.000000,0.000000 *****sigma: 0.000000 *****w (weights): 1.000000 ... 1.000000 *****Dirichlet:sparse,theta,omega,a,b,rho,augment: 0,0,1,0.5,1,4,0 *****nkeeptrain,nkeeptest,nkeeptestme,nkeeptreedraws: 5,5,5,5 *****printevery: 100 *****skiptr,skipte,skipteme,skiptreedraws: 1,1,1,1

MCMC done 0 (out of 15) time: 0s check counts trcnt,tecnt,temecnt,treedrawscnt: 5,0,0,5


Why am I getting y1,yn: -239.336986, -172.336986 When I don't have negative values. 


I know I can get negative values with BART as part of the data transformation but my lowest value in the data set is: 98 and the highest 695. 

Thanks in advance. 

I shouldn't get negative values at all. 
0

There are 0 answers