Package gmediation. R topics documented: June 27, Type Package

Similar documents
Package cnbdistr. R topics documented: July 17, 2017

Package XNomial. December 24, 2015

Package uqr. April 18, 2017

Package MSMwRA. August 7, 2018

Package LNIRT. R topics documented: November 14, 2018

Package cbinom. June 10, 2018

Package ProjectManagement

Package BatchGetSymbols

Package fmdates. January 5, 2018

Package beanz. June 13, 2018

Package dng. November 22, 2017

Package BatchGetSymbols

Package ELMSO. September 3, 2018

Package EMT. February 19, 2015

Package scenario. February 17, 2016

Package stable. February 6, 2017

mfx: Marginal Effects, Odds Ratios and Incidence Rate Ratios for GLMs

Package conf. November 2, 2018

Package eesim. June 3, 2017

Package SimCorMultRes

Package ratesci. April 21, 2017

Package epidata. April 3, 2018

Package GenOrd. September 12, 2015

Package Strategy. R topics documented: August 24, Type Package

Introduction Dickey-Fuller Test Option Pricing Bootstrapping. Simulation Methods. Chapter 13 of Chris Brook s Book.

Package LendingClub. June 5, 2018

Package MultiSkew. June 24, 2017

Package rpms. May 5, 2018

Package finiteruinprob

Package rtip. R topics documented: April 12, Type Package

Package lcyanalysis. R topics documented: March 29, 2018

Appendix. A.1 Independent Random Effects (Baseline)

Package PortRisk. R topics documented: November 1, Type Package Title Portfolio Risk Analysis Version Date

Package RcmdrPlugin.RiskDemo

Package rmda. July 17, Type Package Title Risk Model Decision Analysis Version 1.6 Date Author Marshall Brown

Package MixedPoisson

Package bunchr. January 30, 2017

Week 7 Quantitative Analysis of Financial Markets Simulation Methods

KARACHI UNIVERSITY BUSINESS SCHOOL UNIVERSITY OF KARACHI BS (BBA) VI

Package smam. October 1, 2016

Package QRank. January 12, 2017

Package ESG. February 19, 2015

Package tailloss. August 29, 2016

Package valuer. February 7, 2018

Package PortfolioOptim

Package xva. November 26, 2016

Package GCPM. December 30, 2016

Package mle.tools. February 21, 2017

Package quantileda. R topics documented: February 2, 2016

Package neverhpfilter

Package tvm. R topics documented: August 29, Type Package Title Time Value of Money Functions Version Author Juan Manuel Truppia

Package SMFI5. February 19, 2015

Package jrvfinance. R topics documented: August 29, 2016

Credit Risk Modeling Using Excel and VBA with DVD O. Gunter Loffler Peter N. Posch. WILEY A John Wiley and Sons, Ltd., Publication

Package multiassetoptions

Package FADA. May 20, 2016

WC-5 Just How Credible Is That Employer? Exploring GLMs and Multilevel Modeling for NCCI s Excess Loss Factor Methodology

Package optimstrat. September 10, 2018

Market Risk Analysis Volume II. Practical Financial Econometrics

Package cumstats. R topics documented: January 16, 2017

Contents. An Overview of Statistical Applications CHAPTER 1. Contents (ix) Preface... (vii)

Package semsfa. April 21, 2018

Package obanalytics. R topics documented: November 11, Title Limit Order Book Analytics Version 0.1.1

CHAPTER 12 EXAMPLES: MONTE CARLO SIMULATION STUDIES

Package ESGtoolkit. February 19, 2015

A1. Relating Level and Slope to Expected Inflation and Output Dynamics

UQ, STAT2201, 2017, Lectures 3 and 4 Unit 3 Probability Distributions.

Subject CS1 Actuarial Statistics 1 Core Principles. Syllabus. for the 2019 exams. 1 June 2018

Probability Distributions: Discrete

Supplementary Appendix

Package ald. February 1, 2018

Package pglm. November 2, 2017

Package ensemblemos. March 22, 2018

Statistical Models and Methods for Financial Markets

Package PairTrading. February 15, 2013

Package easi. February 15, 2013

Financial Models with Levy Processes and Volatility Clustering

Information Share, or, measuring the importance of different markets

Package RTDAmeritrade

Much of what appears here comes from ideas presented in the book:

Package ragtop. September 28, 2016

CS 361: Probability & Statistics

Modelling Returns: the CER and the CAPM

Market Risk Analysis Volume I

TABLE OF CONTENTS - VOLUME 2

Web Science & Technologies University of Koblenz Landau, Germany. Lecture Data Science. Statistics and Probabilities JProf. Dr.

Introductory Econometrics for Finance

Package bbdetection. September 8, 2017

From Financial Engineering to Risk Management. Radu Tunaru University of Kent, UK

STA 4504/5503 Sample questions for exam True-False questions.

Package eventstudies

The University of Chicago, Booth School of Business Business 41202, Spring Quarter 2017, Mr. Ruey S. Tsay. Solutions to Final Exam

Financial Econometrics Notes. Kevin Sheppard University of Oxford

ก ก ก ก ก ก ก. ก (Food Safety Risk Assessment Workshop) 1 : Fundamental ( ก ( NAC 2010)) 2 3 : Excel and Statistics Simulation Software\

Stochastic Claims Reserving _ Methods in Insurance

Comparison of design-based sample mean estimate with an estimate under re-sampling-based multiple imputations

VERSION 7.2 Mplus LANGUAGE ADDENDUM

Package ph2mult. November 23, 2016

University of New South Wales Semester 1, Economics 4201 and Homework #2 Due on Tuesday 3/29 (20% penalty per day late)

Internet Appendix for Asymmetry in Stock Comovements: An Entropy Approach

Transcription:

Type Package Package gmediation June 27, 2017 Title Mediation Analysis for Multiple and Multi-Stage Mediators Version 0.1.1 Author Jang Ik Cho, Jeffrey Albert Maintainer Jang Ik Cho <jxc864@case.edu> Description Current version of this R package conducts mediation path analysis for multiple mediators in two stages. License GPL-2 GPL-3 Encoding UTF-8 LazyLoad true LazyData true Imports plyr (>= 1.8.4), VGAM (>= 1.0), MASS Suggests mediation, knitr, rmarkdown RoxygenNote 6.0.1 VignetteBuilder knitr NeedsCompilation no Repository CRAN Date/Publication 2017-06-27 14:38:01 UTC R topics documented: dental............................................ 2 gmediate........................................... 2 Index 5 1

2 gmediate dental gmediate example : Dental Data Description To assess paths between socioeconomic status and dental caries in children Format data frame gmediate Generalized Causal Mediation and Path Analysis Description Usage This function estimates causal mediation and path effects for models with two stages of mediation gmediate(data, model.m1, model.m2, model.y, expos, ref = NULL, refmult = 1, seed = 1234, bootsims = 500, cluster = NULL, decomp = 1, sig.level = 95, sens.par = c(-0.9, 0, 0.5, 0.9)) Arguments data model.m1 model.m2 model.y expos ref refmult seed bootsims cluster decomp sig.level sens.par a data frame a list of the model fit from each first stage mediators a list of the model fit from each second stage mediators an object of the model fit from the response variable a vector with the name of the exposure variable and exposure value e.g. c("exposure variable name", c(exposure value)) a vector with the name of the reference group variable and reference group value e.g. c("reference group variable name", c(reference group value)) numeric value used as a multiplier to increase the number of monte carlo draws seed to generate bootstrap samples number of bootstrap samples to generate the cluster variable that will be used for cluster bootstrap resampling option with two choices for decomposition of total exposure effect confidence level for bootstrap confidence interval a vector with numeric values for sensitivity parameters to be used when the path is non-identifiable

gmediate 3 Details This function carries out inference for mediation (path) effects based on user-specified models. The function allows for two stages of mediation (up to three links from exposure/treatment, X, to final outcome, Y), and an arbitrary number of mediators at each stage. The user specifies an allowed generalized regression model for each outcome (Y and each mediator). Allowed distributions (link functions) include: normal (identity link), Bernoulli (logit link), Poisson (log link), and negative binomial (log link); note that canonical links are used for each distribution. Unsaturated models (i.e., leaving out earlier stage mediators) are allowed, possibly imposing a prior null paths. Baseline (pre-exposure) covariates may be included in each model. The user-specified models are re-fit in the function using the complete cases (based on all the model variables). The user may also specify a reference group, effectively defining the empirical multivariate baseline covariate distribution used in the mediation formula; this may be viewed as defining the subpopulation to which inference is performed. The default reference group is the whole (complete case) sample. The reference group may also be cloned by a specified integer multiple ( refmult ) to reduce Monte Carlo error (at the possible cost of longer computing time). An extended mediation formula is used to estimate each path effect. The sum of effects (or overall effect ) for paths through each mediator is also computed. For paths (and overall) effects that are non-identifiable, multiple estimates are provided according to specified sensitivity parameters values ( sens.par, a list of values between 1 and 1), the default values being -0.9, 0, 0.5, and 0.9. Path effects have alternative versions depending on the manner in which the total exposure effect is decomposed. Two choices, using decomp, are provided; the ordering of mediators in specified models also generally affect the decomposition. Bootstrap resampling is used to obtain bootstrap percentile method confidence intervals (at the 95 percent, or user-specified, confidence level). The option cluster can be used to specify a unit (aside from the individual, that is, each data record, which is the default) for which cluster bootstrap resampling is performed. See Also mediation Examples library(gmediation) ## mediation analysis for two stage mediators with one mediator at each stage model.y1 <- glm(dmftd ~ ses + grpvlb + grpbpd + race + SEX + brush + seal, family = binomial, model.m11 <- glm(brush ~ ses + grpvlb + grpbpd + race + SEX, family = binomial, model.m21 <- glm(seal ~ ses + grpvlb + grpbpd + race + SEX + brush, family = binomial, single <- gmediate(data = dental, model.m1 = list(model.m11), model.m2 = list(model.m21), model.y = model.y1, expos = c("ses", 1), ref = c("ses", c(0,1)), seed = 1234, bootsims = 100, cluster = NULL, decomp = 1, sig.level = 95, sens.par = c(0), refmult = 1) single names(single) ## Not run:

4 gmediate ## mediation analysis for two stage mediators with two mediator at each stage model.y2 <- glm(dmftd ~ ses + grpvlb + grpbpd + race + SEX + brush + visit + seal + ohi, family = binomial, model.m11 <- glm(brush ~ ses + grpvlb + grpbpd + race + SEX, family = binomial, model.m12 <- glm(visit ~ ses + grpvlb + grpbpd + race + SEX, family = binomial, model.m21 <- glm(seal ~ ses + grpvlb + grpbpd + race + SEX + brush + visit, family = binomial, model.m22 <- glm(ohi ~ ses + grpvlb + grpbpd + race + SEX + brush + visit, family = gaussian, gmediate(data = dental, model.m1 = list(model.m11,model.m12), model.m2 = list(model.m21,model.m22), model.y = model.y2, expos = c("ses", 1), ref = c("ses", c(0,1)), seed = 352, bootsims = 100, cluster = NULL, decomp = 2, sig.level = 95, sens.par = c(0,0.9), refmult = 2) ## End(Not run)

Index Topic dataset dental, 2 dental, 2 gmediate, 2 5