Non-centered contrasts require an intercept for correct specification of experimental hypotheses. These functions enable the user to check for existance of intercepts and to add or remove intercept columns as needed.
Usage
add_intercept(x)
remove_intercept(x)
is_intercept(x)
which_intercept(x)
has_intercept(x)
Value
A single logical value (has_intercept), a logical vector (is_intercept), an integer index vector (which_intercept), or a modified hypr object (add_intercept, remove_intercept)
Arguments
x
A hypr object
Functions
add_intercept(): Add an intercept column if there is none
remove_intercept(): Remove the intercept column if there is one
which_intercept(): Return indices, not a logical vector of intercept columns
has_intercept(): Check whether any of the contrasts is an intercept
Details
There are functions available to check whether a hypr object contains an intercept (has_intercept) or which contrast is the intercept (is_intercept, which_intercept). Moreover, if needed, the user can add (add_intercept) or remove (remove_intercept) an intercept column to/from a hypr object. add_intercept and remove_intercept do not throw an error if the user attempts to remove a non-existing intercept or add an intercept if there already is one.