move.2 | R Documentation |
Calculates the Maintenance Of Variance Extension, Type 2 (MOVE.2) for record extension by fitting a Line of Organic Correlation (LOC) regression model.
move.2(formula, data, subset, distribution = "normal", lag = 0)
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 |
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. |
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.
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 |
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 |
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 |
distribution |
the value supplied in |
Objects of class "move.2" have print
, predict
, and
plot
methods.
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.
predict.move.2
, plot.move.2
,
optimBoxCox
## Not run: # See the vignette: vignette("RecordExtension", package="smwrStats") ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.