linearmodels.iv.data.IVData

class linearmodels.iv.data.IVData(x: IVData | ndarray | DataArray | DataFrame | Series | None, var_name: str = 'x', nobs: int | None = None, convert_dummies: bool = True, drop_first: bool = True)[source]

Type abstraction for use in univariate models.

Parameters:
x: IVData | ndarray | DataArray | DataFrame | Series | None

Data to wrap and standardize. If None, then nobs must be provided to produce an IVData instance with shape (nobs, 0).

var_name: str = 'x'

Variable name to use when naming variables in NumPy arrays or xarray DataArrays

nobs: int | None = None

Number of observation, used when x is None. If x is array_like, then nobs is used to check the number of observations in x.

convert_dummies: bool = True

Flat indicating whether pandas categoricals or string input data should be converted to dummy variables

drop_first: bool = True

Flag indicating to drop first dummy category

Methods

drop(locs)

Properties

cols

Column labels

isnull

labels

Dictionary containing row and column labels keyed by axis

ndarray

ndarray view of data, always 2d

ndim

Number of dimensions

pandas

DataFrame view of data

rows

Row labels (index)

shape

Tuple containing shape