sapwood_fit | R Documentation |
The function takes in heartwood and sapwood (and possibly tree ring width) data from a dataset and returns a fit and some information about the fit, such as prediction intervals, figures, confidence intervals for parameters etc. See Edvardsson et al.
sapwood_fit_l( formula, dat, alpha = 0.05, mu_theta_1 = log(0.1), sd_theta_1 = (log(0.1) + 4 * log(10))/2, mu_theta_2 = log(0.1), sd_theta_2 = (log(0.1) + 4 * log(10))/2, H_0 = 100 ) sapwood_fit_pl( formula, dat, alpha = 0.05, mu_theta_1 = log(0.1), sd_theta_1 = (log(0.1) + 4 * log(10))/2, mu_theta_2 = log(0.1), sd_theta_2 = (log(0.1) + 4 * log(10))/2, H_0 = 100 ) sapwood_fit_plw( formula, dat, alpha = 0.05, mu_theta_1 = log(0.1), sd_theta_1 = (log(0.1) + 4 * log(10))/2, mu_theta_2 = log(0.1), sd_theta_2 = (log(0.1) + 4 * log(10))/2, H_0 = 100 )
formula |
Formula for the fit. If using |
dat |
Dataset to be fitted to. Column names should match formula arguments |
alpha |
Confidence of the fit, for prediction, confidence for median and parameter confidence intervals. defaults to 0.05 (which corresponds to 95% confidence) |
mu_theta_1 |
Regularization mu for theta_1 (see Edvardsson et al. 2021) |
sd_theta_1 |
Regularization sigma for theta_1 (see Edvardsson et al. 2021) |
mu_theta_2 |
Regularization mu for theta_2 (see Edvardsson et al. 2021) |
sd_theta_2 |
Regularization sigma for theta_2 (see Edvardsson et al. 2021) |
H_0 |
Cutoff point for parabolic-linear model. Only relevant for |
The functions return objects of class "sapwood_fit". An object of class "sapwood_fit" is a list containing the following components:
|
Confidence intervals for the parameters of the model. |
|
Predictions for the model for H between 0 and 500, if |
|
Standardized residuals of the model. See Edvardsson et al. 2021. |
|
AIC of the model |
|
The formula for the model, as specified in the input. |
|
Type of the model, "parabolic_linear_W", "parabolic_linear" or "linear" (Models 1,2 and 3, respectively). |
|
Confidence of the model |
#' @seealso summary.sapwood_fit
for summaries, predict.sapwood_fit
for prediction. It is also useful to look at plot.sapwood_fit
to help visualize the model.
data(smaland) fit <- sapwood_fit_pl(S~H, smaland) summary(fit) plot(fit) plot(fit, type="residual") plot(fit, type="qq") residuals(fit) AIC(fit)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.