corfit: Calculate the correlation between the fitted model and data.

View source: R/util.R

corfitR Documentation

Calculate the correlation between the fitted model and data.

Description

Calculate the correlation between the fitted model and data.

Usage

corfit(model)

Arguments

model

A fitted regression model (using gam, or bam).

Value

Numeric value: correlation between fitted model and data.

See Also

Other Utility functions: convertNonAlphanumeric(), diff_terms(), find_difference(), missing_est(), modeledf(), observations(), print_summary(), refLevels(), res_df(), summary_data(), timeBins()

Examples

data(simdat)

# Fit simple GAM model:
gam1 <- bam(Y ~ s(Time), data=simdat, discrete=TRUE)
corfit(gam1)


itsadug documentation built on June 17, 2022, 5:05 p.m.