pymare.core
.Dataset
- class Dataset(y=None, v=None, X=None, n=None, data=None, X_names=None, add_intercept=True)[source]
Bases:
object
Container for input data and arguments to estimators.
- Parameters:
y (None or
numpy.ndarray
of shape (K,) orstr
, optional) – 1d array of study-level estimates with length K, or the name of the column in data containing the y values. Default = None.v (None or
numpy.ndarray
of shape (K,) orstr
, optional) – 1d array of study-level variances with length K, or the name of the column in data containing v values. Default = None.X (None or
numpy.ndarray
of shape (K,[P]) orlist
ofstr
, optional) – 1d or 2d array containing study-level predictors (dimensions K x P), or a list of strings giving the names of the columns in data containing the X values. Default = None.n (None or
numpy.ndarray
of shape (K,) orstr
, optional) – 1d array of study-level sample sizes (length K), or the name of the corresponding column indata
. Default = None.data (None or
pandas.DataFrame
, optional) – A pandas DataFrame containing y, v, X, and/or n values. By default, columns are expected to have the same names as arguments (e.g., the y values will be expected in the ‘y’ column). This can be modified by passing strings giving column names to any of they
,v
,X
, orn
arguments. Default = None.X_names (None or
list
ofstr
, optional) – List of length P containing the names of the predictors. Ignored ifdata
is provided (useX
to specify columns). Default = None.add_intercept (
bool
, optional) – If True, an intercept column is automatically added to the predictor matrix. If False, the predictors matrix is passed as-is to estimators. Default = True.