Learn R Programming

itsadug (version 2.0)

missing_est: Return indices of data that were not fitted by the model.

Description

Return indices of data that were not fitted by the model.

Usage

missing_est(model)

Arguments

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

Value

  • The indices of the data that were not fitted by the model.

See Also

Other Utility functions: convertNonAlphanumeric, diff_terms, findAbsMin, find_difference, find_n_neighbors, getDec, getRange, group_sort, list2str, move_n_point, print_summary, se, summary_data, timeBins

Examples

Run this code
data(simdat)

# Add missing values:
set.seed(123)
simdat[sample(nrow(simdat), size=20),]$Y <- NA
# Fit simple linear model:
lm1 <- lm(Y ~ Time, data=simdat)
na.el <- missing_est(lm1)
length(na.el)

Run the code above in your browser using DataLab