getrmse: getrmse calculates the rmse of the input 'invar' series

Description Usage Arguments Value Examples

View source: R/cpuefuncs.r

Description

getrmse calculates the rmse of the input invar series (defaults to 'cpue') against an input 'year' time series. This is primarily designed to generate a more feasible estimate of the intrinsic variability of a cpue time-series that may be obtained from a cpue standardization

Usage

1
getrmse(indat, invar = "cpue", inyr = "year")

Arguments

indat

the matrix, spmdat, or data.frame containing both a 'year' column and an invar column (default to 'cpue')

invar

the column whose rmse is wanted; defaults to 'cpue'

inyr

the column that points to the year name

Value

a list of the rmse and the loess predicted values of the invar for each year in the time-series

Examples

1
2
3
4
5
6
7
8
## Not run: 
year <- 1986:1995
cpue <- c(1.2006,1.3547,1.0585,1.0846,0.9738,1.0437,0.7759,1.0532,1.284,1.3327)
dat <- as.matrix(cbind(year,cpue))
getrmse(dat,invar="cpue")  # should be 0.08856596
getrmse(dat,invar="cpue")$rmse

## End(Not run)

haddonm/r4cpue documentation built on May 11, 2020, 1:31 a.m.