cjcarlson / embarcadero

🌲🌉 Species distribution models with Bayesian additive regression trees
49 stars 11 forks source link

Categorical variables not recognized #16

Closed oldi closed 4 years ago

oldi commented 4 years ago

I am starting with the embarcadero package as I would like to compare bayesian-SDMs with standard SDMs. However, I really need to include a categorical raster map (geology in my case) to model a plant species. It is very likely confined to special substrates and this would be important to consider.

Yet, the bart function does not accept a factorial parameter. Any workarounds known?

cjcarlson commented 4 years ago

Hmmm great question. What are you comparing it to? My guess is that in most standard SDM's it's converting the variable into a series of categorical variables (binary variables for each category), and you can do that here for the same effect.

oldi commented 4 years ago

Yes, some others (e.g. Maxent) creates dummy variables and uses these for the model. Then for prediction I think the rasters could work as they are. I will try and comment here again. Thanks

cjcarlson commented 4 years ago

Sounds good!