Description Usage Arguments Details Value References See Also
This function fits a generalized additive model to a loads dataset
1 2 3 4 |
x |
The loads dataset, CQ object resulting from the |
parms |
A list comprising terms to fit in a model:
flow: linear ( |
This is a wrapper function for fitting a generalised additive model using the
link{mgcv}
package. Terms are fitted in the model by "switching" terms on and off.
Apart from the flow
term, all other terms are logical. If a term is intended to be
included in a model, then that term can be set to TRUE
.
To include additional terms to those specified, the user will need to run the gam
function from the mgcv
package that this method is based upon. The following is
an example where an additional variable, "dam" is included into the model.
mod <- gam(log(Conc) ~ log(pQ) + I(log(pQ)^2) + per(days, k=2) + s(MA1day) + s(trend) + dam,
family = gaussian, data = loaddata$CQ, control = gam.control(keepData = TRUE))
where loaddata$CQ
contains an additional column of data labelled, "dam".
an object of class fitmodel
with elements as described in
gamObject
from the mgcv
package. Standard summary
and anova
functions apply.
Kuhnert, P.M., Henderson, B.L., Lewis, S.E., Bainbridge, Z.T., Wilkinson, S.N. and Brodie, J.E. (2012) Quantifying total suspended sediment export from the Burdekin River catchment using the loads regression estimator tool, Water Resources Research, 48, W04533,doi:10.1029/2011WR011080.
ReadInData, CreateData, gam, diagnostic
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.