Learn R Programming

supernova (version 2.5.1)

df_term: Get the degrees of freedom a variable or term uses

Description

A term here is a predictor from a linear model (e.g. "weight" or "weight:height") whereas a variable is a column in a data frame (e.g. "weight" or "height").

Usage

df_term(term, data)

df_variable(variable, data)

Value

The degrees of freedom used by the term or variable in the model (as an integer).

Arguments

term, variable

The term or variable to get the degrees of freedom for. It should match one of the column names in data, or, if it is an interactive term (e.g. "weight:height"), all components must be column names in data.

data

The data the term is from.