[R] Not getting any result from 'gbm'?

David Winsemius dwinsemius at comcast.net
Sat Oct 5 08:02:53 CEST 2013


On Oct 3, 2013, at 3:07 PM, Mary Kindall wrote:

> In the reproducible example given below, why I am not getting any result
> with generalized boosted model (gbm).  Other methods does show me the
> desired result.
> In the example data file (attached) example.txt, the predictors x3 and x4
> are correlated with response Y.
> 
> 
> 
> tmpData = read.table("Desktop/example.txt", sep="\t",header=TRUE)
> head(tmpData)
> fmla = getTheFormulaFromDataFrame(tmpData)

> fmla = getTheFormulaFromDataFrame(tmpData)
Error: could not find function "getTheFormulaFromDataFrame"


> fmla
> gbm(fmla, distribution = "bernoulli", data = tmpData) #doesn't work
> 
> #All the following works
> bagging(fmla,  data=tmpData, control=control, coob=TRUE)
> rpart(fmla,  dat=tmpData, method = "class", control=control )
> glm(fmla, family="binomial", data = tmpData)
> 
> 
> Thanks
> 
> 
> 
> -- 
> -------------
> Mary Kindall
> Yorktown Heights, NY
> USA
> <example.txt>______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

David Winsemius
Alameda, CA, USA



More information about the R-help mailing list