Extract esimates of Px from an object returned by fitplc
, fitplcs
, fitcond
or fitconds
. This function allows extraction of estimates of P88 or other values when the fit estimated P50 (or other).
With the Weibull model, it appears to be more robust to set x=50
when fitting the curve, and extracting other points with getPx
.
See examples for use of this function. Note that the confidence interval is based on the bootstrap resampling performed by fitplc
. If the bootstrap was not performed durinf the fit (i.e. boot=FALSE
in fitplc
or elsewhere), it only returns the fitted values, and not the confidence intervals.
getPx(object, x = 50, coverage = 0.95, rescale_Px = FALSE, ...) # S3 method for default getPx(object, x = 50, coverage = 0.95, rescale_Px = FALSE, ...) # S3 method for manyplcfit getPx(object, ...)
object | Object returned by any of the fitting functions (e.g. |
---|---|
x | The x in Px, that is, if P50 should be returned, x=50. Can be a vector, to return multiple points at once. |
coverage | The desired coverage of the confidence interval (0.95 is the default). |
rescale_Px | Logical (default FALSE). If TRUE, rescales calculation of Px for the sigmoidal model, by finding water potential relative to K at zero water potential (which for the sigmoidal model, is not equal to Kmax). If you fitted |
… | Further arguments passed to methods (none yet). |
Note that this function does not return a standard error, because the bootstrap confidence interval will be rarely symmetrical. If you like, you can calculate it as the mean of the half CI width (and note it as an 'approximate standard error'). A better approach is to only report the CI and not the SE.
Sometimes the upper CI cannot be calculated and will be reported as NA
. This indicates that the upper confidence bound is outside the range of the data, and can therefore not be reliably reported. It is especially common when x
is large, say for P88.
default
: Calculate Px for a single fitted curve.
manyplcfit
: Calculate Px for many fitted curves.
# A fit somefit <- fitplc(stemvul, x=50, model="sigmoid") # Extract P12, P88 # Note NA for upper CI for P88; this is quite common # and should be interpreted as falling outside the range of the data. getPx(somefit, x=c(12,88))#> x Px 2.5% 97.5% #> 1 12 0.9878166 0.6349726 1.310265 #> 2 88 4.7452769 4.1258506 NA# Extract P88 from multiple fitted curves fits <- fitplcs(stemvul, "Species", boot=FALSE) getPx(fits, 88)#> Group x Px #> 1 dpap 88 4.482960 #> 2 egran 88 4.240978 #> 3 ssay 88 3.134183