## Average Marginal Effects in a 2-Arm Parallel Randomized Controlled Trial with Heterogeneity of Effects by Strata

The utility of the method of Average Marginal Effects in many contexts of statistical modeling makes the lack of accessible resources in the literature surrounding them a tragedy for both statisticians and those who consume statistics. In this presentation, I attempt to solve this problem by deriving the estimate of the AME, and its standard error in the context of a common experimental design; namely, the 2-arm parallel randomized controlled trial (RCT) with heterogeneity of effects by site. We follow each section with straight forward programming techniques to apply this method to real data.

## Export R to SPSS with Variable Labels

The foreign R package is useful for exporting data sets to all kinds of formats including files for the proprietary SPSS program from IBM. However, the default method for writing to SPSS doesn’t allow for variable labels. Instead, it defaults to labeling all of the variables by their name from the column headings. In this presentation, we will use the Hmisc R package for its variable labeling functionality and write a modification to the original SPSS export function from the foreign R package.

## Regression Output

The general linear model (GLM), more commonly called linear regression, is the most common statistical modeling tool a statistician or data scientist will use. As such, it is crucial to know how to present results from a GLM in a way that is understandable to your audience.

## Data Summaries

An essential part of any data analysis project is to understand the data at hand.

## Creating an Analytic Data Set

Creating an analytic data set is very important when doing data analysis and will be used to reproduce the results.

Created by Wade K. Copeland | Privacy Policy | This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.

## Recent Comments