fsm_batch¶
- fsm_batch(x, x_past, z_past, order, *, s_function='dopt', q_initial=None, eps=0.001, ties='random', intercept=True, standardize=True, pol_mat=None, w_pol=None, keep_criteria=False, rng=None)[source]¶
Allocate a new batch of units given units already allocated.
Each group starts from the information carried by its past members, and spread criteria include those members. Standardization, the ridge and the
dopt_pcprojection use past and new units together.max_pcandmin_pcuse the principal component of the new units alone. Only new units are candidates for selection.- Parameters:
x (ndarray) – Covariates of the new units.
x_past (ndarray) – Covariates of the units already allocated.
z_past (ndarray) – Group labels of the units already allocated.
order (SelectionOrder | ndarray) – Selection order for the new units, one stage per new unit.
s_function (Literal['constant', 'dopt', 'aopt', 'negative_dopt', 'max_pc', 'min_pc', 'dopt_pc', 'max_average', 'min_average', 'dopt_average', 'marginal_var_sum']) – Selection function; see
fsm().q_initial (ndarray | None) – See
fsm().pol_mat (ndarray | None) – See
fsm().w_pol (ndarray | None) – See
fsm().rng (Generator | None) – See
fsm().
- Returns:
The allocation of the new units;
selectedindexes rows ofx.- Raises:
ValueError – If the inputs do not line up.
- Return type: