corfun: Function for evaluating model fit.

Description Usage Arguments Details Value

View source: R/ml_diag.R

Description

Model fit function for the ml_diag function.

Usage

1
corfun(y, yhat, type = c("gaussian", "binomial"))

Arguments

y

Dependent variable used in the model.

yhat

Predictions of the dependent variable.

type

Character string giving the type of model used (currently only binomial and gaussian are supported).

Details

Returns either the square correlation between the dependent variable and its predictions or the expected proportional reduction in error if the model is a binomial GLM.

Value

A scalar giving the model fit


davidaarmstrong/mldiag documentation built on April 17, 2020, 12:04 a.m.