Skip to content

Instantly share code, notes, and snippets.

@explodecomputer
Created September 27, 2018 16:18
Show Gist options
  • Save explodecomputer/1dba2ff5b8cf9f60093266b1dedb7e7c to your computer and use it in GitHub Desktop.
Save explodecomputer/1dba2ff5b8cf9f60093266b1dedb7e7c to your computer and use it in GitHub Desktop.
fix 3
dat_3a$rsq.exposure <- with(dat_3a, 2 * beta.exposure^2 * eaf.exposure * (1-eaf.exposure))
dat_3a$rsq.outcome <- with(dat_3a, 2 * beta.outcome^2 * eaf.outcome * (1-eaf.outcome))
dat_3a$steiger_dir <- dat_3a$rsq.exposure > dat_3a$rsq.outcome
dat_3b$rsq.exposure <- with(dat_3b, 2 * beta.exposure^2 * eaf.exposure * (1-eaf.exposure))
dat_3b$rsq.outcome <- with(dat_3b, 2 * beta.outcome^2 * eaf.outcome * (1-eaf.outcome))
dat_3b$steiger_dir <- dat_3b$rsq.exposure > dat_3b$rsq.outcome
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment