Skip to contents

Estimation of marginal effects in GLMs for two-armed randomised trials

In cases where observations are randomly allocated into binary groups, any group effect estimand is most robustly estimated using plug-in estimation and estimating the variance using influence functions

rctglm()
Fit GLM and find any estimand (marginal effect) using plug-in estimation with variance estimation using influence functions

Methods for rctglm objects

estimand() est() coef(<rctglm>) print(<rctglm>)
Methods for objects of class rctglm

Estimation using prognostic scores

When historical data is available from one group, a (prognostic) model can be fit to the historical data, which is then used to predict outcomes for all observations and used as a covariate in the model to improve efficiency

rctglm_with_prognosticscore()
Use prognostic covariate adjustment when fitting an rctglm
prog()
Extract information about the fitted prognostic model
fit_best_learner()
Find the best learner in terms of RMSE among specified learners using cross validation
default_learners()
Creates a list of learners

Power approximation

Approximation formulas exist to estimate the sample size needed to obtain a power of a chosen level. Functionalities are implemented here to utilise these formulas to approximate the power from a given sample size and assumed effect size together with other parameters.

power_marginaleffect()
Power approximation for estimating marginal effects in GLMs
variance_ancova() power_gs() samplesize_gs() power_nc()
Power and sample size estimation for linear models

Generate data from GLM model with known mean

Used in development for examples, vignettes and tests, but exported to enable users to perform exploratory analyses across different scenarios of simulated data with and without prognostic covariate adjustment

glm_data()
Generate data simulated from a GLM

Package level options

options
postcard Options