Utility Functions

Share:

Description

rmse computes the root mean squared error (rsme) of two numeric vectors

freq counts the frequency using user-defined categories

hermite.gauss gives a abscissae and weights of hermite-gauss quadrature (n=12)

Usage

1
2
3
4
5
rmse(x, y)

freq(x, categories)

hermite.gauss()

Arguments

x

a vector/matrix of numeric values

y

a vector/matrix of numeric values

categories

a vector of valid counting values

Examples

1
2
3
4
5
rmse(1:10+rnorm(10), 1:10+rnorm(10))
rmse(matrix(1:100+rnorm(100), ncol=5), matrix(1:100+rnorm(100), ncol=5))
freq(sample(1:4, 100, replace=TRUE), 5:1)
freq(sample(1:4, 100, replace=TRUE), 1:5)
hermite.gauss()