linearmodels.iv.data.IVData

class IVData(x, var_name='x', nobs=None, convert_dummies=True, drop_first=True)[source]

Type abstraction for use in univariate models.

Parameters:
x{ndarray, Series, DataFrame, DataArray}

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

var_namestr

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

nobsint

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_dummiesbool

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

drop_firstbool

Flag indicating to drop first dummy category

Attributes:
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

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