rsquared.period: Coefficient of determination for period based regression...

Description Usage Arguments Value Author(s) See Also Examples

View source: R/rsquared.period.R

Description

Return the coefficient of determination (R^2) to inspect the relationship between concentration and flow. It is a useful tool for the function rating.period and ferguson.period.

Usage

1
rsquared.period(db, ncomp, period)

Arguments

db

An input data frame with at least three column. A column with DateTime in standard format (yyyy-mm-dd HH:MM:SS) labeled "datetime", a column with flow records in cubic meter per second labeled "flow", and columns with scattered concentration data in milligram per litre. Alternatively, it can be used the output matrix of the function db.union.

ncomp

Number of compounds in the input data frame for which the load must be estimated.

period

A mandatory argument that specify the time period in which the regression relationship must be calculated. It can be "month" for a monthly estimation of load, or it can be "year" for annual estimation of load.

Value

A matrix with the R^2 value for the different compiunds.

Author(s)

Veronica Nava

See Also

db.union rating.period ferguson.period

Examples

1
2
3
4
data("flow.data3","conc.data3")
union<-db.union(flow.data3, conc.data3)
rsquared.period(union,1, "month")
rsquared.period(union,1, "year")

RiverLoad documentation built on Jan. 4, 2022, 5:07 p.m.