Skip to contents

Fitting a single-segment curve

Each function fits one model, and returns a fit that predict() and coef() work with.

rc_powerlaw()
Fit a power-law rating curve on the original scale
rc_powerlaw_log()
Fit a power-law rating curve on the log-log scale
rc_poly()
Fit polynomial rating curve
rc_loess()
Fit rating curve using loess smoother

Fitting a two-segment curve

rc_2seg_powerlaw()
Fit two-segment power-law rating curve using nls on untransformed data

Variance

How the scatter of the gaugings about the curve is modelled.

var_none() var_prop() var_power() var_spec() print(<rc_variance>)
Variance schemes for rating-curve fits

Predicting, with confidence and prediction limits

predict(<rc_2seg_powerlaw>)
Predict discharge with confidence / prediction limits from a two-segment fit
predict(<rc_loess>)
Predict method for rc_loess objects
predict(<rc_poly>)
Predict method for rc_poly objects
predict(<rc_powerlaw>)
Predict method for rc_powerlaw objects
predict(<rc_powerlaw_log>)
Predict method for rc_powerlaw_log objects

Fitted curves

What a fit contains, and the methods every fit shares.

rating_curve
Rating curve fits
coef(<rating_curve>) coef(<rc_2seg_powerlaw>)
Estimated parameters of a rating curve
fitted(<rating_curve>) residuals(<rating_curve>)
Fitted values and residuals of a rating curve
print(<rating_curve>)
Print a rating curve fit

Data

thompson
Thompson River gaugings