Learn R Programming

halk (version 0.0.5)

calc_mse: Calculate mean-squared-error (MSE) and root mean-squared-error (RMSE) of estimated ages

Description

These functions will calculate MSE and RMSE for estimated ages produced by assign_ages. Output is specific to each level used by the age-length key to assign ages

Usage

calc_mse(data, age_col = "age")

calc_rmse(data, age_col = "age")

Value

Numeric value for estimated ages with no levels or a data.frame with a MSE or RMSE value for each level used to fit ages

Arguments

data

A data.frame as created by assign_ages

age_col

Character. Name of the age column in data

Examples

Run this code
wae_data <- spp_data[spp_data$spp == "walleye", ]
alk <- make_alk(wae_data)
wae_est_age <- assign_ages(wae_data, alk)
calc_mse(wae_est_age)
calc_rmse(wae_est_age)

Run the code above in your browser using DataLab