approx_deriv implements a crude approximation for the uncertainty
around the first derivatives. It should be used complementary to the
conditional bootstrap, if problems with GAMM fittings occur
approx_deriv(init_tbl, mod_tbl, ci_prop_se)
The output tibble of the
A model output tibble from
A conversion factor for approximating derivative CIs in the 'approx_deriv' method; it is multiplied with the ratio between s.e. and mean fitted values of the smoothing curve to represent some level of uncertainty around the slope proportional to the uncertainty in the smoothing curve. Default is 25, which is a compromise representing fairly well the results obtained for the GAMs from the conditional bootstrap.
In this approach derivatives are calculated for the original smoother and some level of uncertainty (not exactly the confidence intervals) is estimated based on the standard error (s.e.) of the smoother. The same proportion of error (estimated as the ratio s.e./fitted mean) is adopted for the maximal slope of the derivative and then kept constant across the entire curve. As this results in much smaller uncertainty ranges, a conversion (or multiplication) factor is implemented to allow modifications of the error proportion. The default of 25 is a compromise representing fairly well the results obtained for the GAMs from the conditional bootstrap.
The function returns the input model tibble with the following 4 columns added
A list-column with sequences of 100 evenly spaced pressure values (with the length of the time series).
A list-column with the first derivatives of the indicator responses averaged across all bootstraps (for the 100 equally spaced pressure values).
A list-column with the upper confidence limit of the bootstrapped first derivatives(for the 100 equally spaced pressure values).
A list-column with the lower confidence limit of the bootstrapped first derivatives(for the 100 equally spaced pressure values).
the wrapper function
1 2 3 4
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.