move.2: Maintenance of Variance Extension, Type 2

View source: R/move.2.R

move.2R Documentation

Maintenance of Variance Extension, Type 2

Description

Calculates the Maintenance Of Variance Extension, Type 2 (MOVE.2) for record extension by fitting a Line of Organic Correlation (LOC) regression model.

Usage

move.2(formula, data, subset, distribution = "normal", lag = 0)

Arguments

formula

a formula object with the response variable on the left of the ~ operator and a single explantory variable on the right.

data

the data frame containing the variables named in formula.

subset

an optional vector specifying a subset of observations to be used in the fitting process.

distribution

either "normal," "lognormal," "commonlog," "log1p," or an object of class "optimBoxCox" indicating the nature of the bivariate distribution, see Details.

lag

the number of days to account for time of travel between the explanatory and response sites. If the explanatory site is upstream, then lag can be positive, otherwise, lag can be negative to account for the travel time between the sites.

Details

MOVE.2 has a necessarily predefined method for missing values—the response variable is assumed to contain missing values and they are the values to be estimated by the model equation. For the function move.2, missing values in the explanatory variable are excluded from the computations.

If distribution is "normal," then the data in the explanatory variable and the response variable are assumed to have a bivariate normal distribution. Otherwise, they are assumed to have a bivariate log-normal distribution and a logarithmic transform is applied to both the explanatory variable and the response variable before analysis. The natural logarithm is used if distribution is "lognormal" and the commmon logarithm is used if distribution is "commonlog." If either the response or the explanatory has zero values, then the "log1p" option can be used. That option adds 1 to each value and then computes the natural logarithm. Alternatively, the output from optimBoxCox that contains both the response and explanatory variables can be supplied to transform those variables by other than a logarithmic transform.

Value

An object of class "move.2" having these components:

coefficients

the intercept and slope of the line describing the fit.

R

Pearson's correlation coefficient.

p.value

the p-value from the correlation test, given a two-sided alternate hypothesis.

call

the matched call to move.1.

fitted.values

the fitted LOC values for the response.

residuals

a 2-column matrix containing the signed distance from the predicted to to the corresponding the response variable and the explanatory variable values.

x

the (possibly transformed and lagged) values for the explanatory variable.

y

the (possibly transformed) values for the response variable.

lag

the value of the lag argument.

xstats

the mean and standard deviation of the (possibly transformed) values for the explanatory variable.

ystats

the mean and standard deviation of the (possibly transformed) values for the response variable.

var.names

the names of the response variable and the explanatory variable.

model

the model frame.

data

the data frame supplied in data.

distribution

the value supplied in distribution.

Note

Objects of class "move.2" have print, predict, and plot methods.

References

Hirsch, R.M., 1982, A comparison of four streamflow record extension techniques: Water Resources Research, v. 18, p. 1081–1088.
Moog, D.B., Whiting, P.J., and Thomas, R.B., 1999, Streamflow record extension using power transformations and applicaitons to sediment transport: Water Resources Research, v. 35, p 243–254.

See Also

predict.move.2, plot.move.2, optimBoxCox

Examples

## Not run: 
# See the vignette:
vignette("RecordExtension", package="smwrStats")

## End(Not run)

USGS-R/smwrStats documentation built on Oct. 11, 2022, 6:15 a.m.