View source: R/paleocar_models_simple.R
| paleocar_models_simple | R Documentation |
This is the primary function for fitting PaleoCAR models to a single predictand using
a uniform set of predictors (tree-ring chronologies). carscores are calculated for
each predictor, and models are calculated by adding predictors stepwise to an ordinary least-squares
linear model using the lm function. Model selection is performed by minizing corrected AIC.
This occurs for every unique set of available predictors through time.
paleocar_models_simple(
predictands,
chronologies,
calibration.years,
prediction.years = NULL,
verbose = F
)
predictands |
A numeric vector of the predictand (response) variable. |
chronologies |
A matrix of tree ring chronologies, indexed annually. Each chronology is a column. The first column must be labeled "YEAR" and is the calendar year. |
calibration.years |
An integer vector of years corresponding to the layers in the |
prediction.years |
An optional integer vector of years for the reconstruction.
If missing, defaults to the total years present in |
verbose |
Logical, display status messages during run. |
See paleocar_models for a batch algorithm that is more efficient (though more
computationally complicated) than the algorithm provided here.
A named list containing
models A data.table giving the fitted coefficients, LOOCV errors, and AICc values through time for each predictand.
predictand A numeric vector of the predictand, as provided.
predictor.matrix A matrix of predictors for calibration; chronologies cropped to calibration.years.
reconstruction.matrix A matrix of predictors for reconstruction; chronologies cropped to prediction.years, or all of chronologies if prediction.years==NULL.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.