slooplot | R Documentation |
This function plots the output of a spatial leave-one-out cross-validation (SLOO-CV) of one or several models running on INLA.
slooplot( alpha = alpha, df = df, mae = mae, ds = ds, family = family, ntrials = ntrials, sqroot = sqroot )
alpha |
Numeric value (0,...,1) giving the threshold for computing confidence intervals (1-alpha) of rmse and mae estimation |
df |
dataframe (output of inla.sloo), which include the "Observed_response", "Predictions", "Residuals", RMSE, MAE (optional), and DS(optional) |
mae |
If TRUE, compute the mean absolute error (mae) and the root mean square error (rmse). If FALSE, compute the rmse only. |
ds |
If TRUE, compute the Dawid-Sebastiani score (ds). If FALSE, does not compute ds. |
family |
Character string or list of Character string giving the family or families, respectively of the response in INLA format |
ntrials |
Numeric value (1,2,...) setting the number of trials for a Binomial family |
sqroot |
If TRUE, compute the square root of the observed and predicted values to generate the rmse and/or mae. |
## Not run: # SLOO function with one model formula (Bernoulli) df<-data.frame(Residuals=runif(10, 0.0, 1.0),RMSE=runif(10, 0.0, 2.0),MAE=runif(10, 0.0, 2.0), Observed_response= sample(c(0,1), replace=TRUE, size=10),Predictions=runif(10, 0.0, 1.0)) alpha = 0.05 family = bernoulli slooplot1<-slooplot(df=df, alpha=0.05,mae=TRUE,ds=FALSE,family='bernoulli',sqroot=FALSE) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.