Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

has.intercept

Check for the presence of an intercept in a formula or in a fitted model


Description

The presence of an intercept is checked using the formula which is either provided as the argument of the function or extracted from a fitted model

Usage

has.intercept(object, ...)

## Default S3 method:
has.intercept(object, ...)

## S3 method for class 'formula'
has.intercept(object, ...)

## S3 method for class 'Formula'
has.intercept(object, rhs = NULL, ...)

## S3 method for class 'panelmodel'
has.intercept(object, ...)

## S3 method for class 'plm'
has.intercept(object, part = "first", ...)

Arguments

object

a formula, a Formula or a fitted model (of class plm or panelmodel),

...

further arguments.

rhs, part

the index of the right hand sides part of the formula for which one wants to check the presence of an intercept (relevant for the Formula and the plm methods),

Value

a boolean


plm

Linear Models for Panel Data

v2.4-1
GPL (>= 2)
Authors
Yves Croissant [aut, cre], Giovanni Millo [aut], Kevin Tappe [aut], Ott Toomet [ctb], Christian Kleiber [ctb], Achim Zeileis [ctb], Arne Henningsen [ctb], Liviu Andronic [ctb], Nina Schoenfelder [ctb]
Initial release
2021-03-02

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.