Build the prediction grid to compute least squares means.

get_pred_grid(
  group_df,
  main_effect_names,
  covariate_names = NULL,
  fspec = as.formula("~.")
)

Arguments

group_df

A dataframe with the reserved 'Group' column, and columns for main effects and covariates.

main_effect_names

Character vector with the column names of the main effects in group_df.

covariate_names

Character vector with the column names of the covariates in group_df.

fspec

A formula specification to be passed to model.matrix to construct the prediction grid in model matrix form.

Value

A matrix of the prediction grid

Author

Daniel Claborne