Description Usage Arguments Value Examples
Create an autocart model
1 |
response |
A vector of numeric response values with no NA entries. |
data |
A dataframe for the predictor variables used in the autocart tree. |
locations |
A two-column matrix with coordinates for the observations the predictor dataframe. |
alpha |
A scalar value between 0 and 1 to weight autocorrelation against reduction in variance in the tree splitting. A value of 1 indicates full weighting on measures of autocorrelation. |
beta |
A scalar value between 0 and 1 to weight the shape of the region in the splitting |
control |
An object of type "autocartControl" returned by the |
An S3 object of class "autocart".
1 2 3 4 5 6 7 8 | # Load some data for an autocart example
snow <- na.omit(read.csv(system.file("extdata", "ut2017_snow.csv", package = "autocart")))
y <- snow$yr50[1:40]
X <- data.frame(snow$ELEVATION, snow$MCMT, snow$PPTWT, snow$HUC)[1:40, ]
locations <- as.matrix(cbind(snow$LONGITUDE, snow$LATITUDE))[1:40, ]
# Create an autocart model with 50 trees
snow_model <- autocart(y, X, locations, 0.30, 0)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.