# Articles by Keith Goldfeld

### Importance sampling adds an interesting twist to Monte Carlo simulation

January 17, 2018 |

I’m contemplating the idea of teaching a course on simulation next fall, so I have been exploring various topics that I might include. (If anyone has great ideas either because you have taught such a course or taken one, definitely drop me a note.) Monte Carlo (MC) simulation is ...

### Simulating a cost-effectiveness analysis to highlight new functions for generating correlated data

January 7, 2018 |

My dissertation work (which I only recently completed - in 2012 - even though I am not exactly young, a whole story on its own) focused on inverse probability weighting methods to estimate a causal cost-effectiveness model. I don’t really do any cost-effectiveness analysis (CEA) anymore, but it came up ...

### When there’s a fork in the road, take it. Or, taking a look at marginal structural models.

December 10, 2017 |

I am going to cut right to the chase, since this is the third of three posts related to confounding and weighting, and it’s kind of a long one. (If you want to catch up, the first two are here and here.) My aim with these three posts is ...

### When you use inverse probability weighting for estimation, what are the weights actually doing?

December 3, 2017 |

Towards the end of Part 1 of this short series on confounding, IPW, and (hopefully) marginal structural models, I talked a little bit about the fact that inverse probability weighting (IPW) can provide unbiased estimates of marginal causal effects in the context of confounding just as more traditional regression models like ...

### Characterizing the variance for clustered data that are Gamma distributed

November 26, 2017 |

Way back when I was studying algebra and wrestling with one word problem after another (I think now they call them story problems), I complained to my father. He laughed and told me to get used to it. “Life is one big word problem,” is how he put it. Well, ...

### Visualizing how confounding biases estimates of population-wide (or marginal) average causal effects

November 15, 2017 |

When we are trying to assess the effect of an exposure or intervention on an outcome, confounding is an ever-present threat to our ability to draw the proper conclusions. My goal (starting here and continuing in upcoming posts) is to think a bit about how to characterize confounding in a ...

### A simstudy update provides an excuse to generate and display Likert-type data

November 6, 2017 |

I just updated simstudy to version 0.1.7. It is available on CRAN. To mark the occasion, I wanted to highlight a new function, genOrdCat, which puts into practice some code that I presented a little while back as part of a discussion of ordinal logistic regression. The new function was motivated ...

### Thinking about different ways to analyze sub-groups in an RCT

October 31, 2017 |

Here’s the scenario: we have an intervention that we think will improve outcomes for a particular population. Furthermore, there are two sub-groups (let’s say defined by which of two medical conditions each person in the population has) and we are interested in knowing if the intervention effect is ...

### Who knew likelihood functions could be so pretty?

October 22, 2017 |

I just released a new iteration of simstudy (version 0.1.6), which fixes a bug or two and adds several spline related routines (available on CRAN). The previous post focused on using spline curves to generate data, so I won’t repeat myself here. And, apropos of nothing really - I thought ...

### Can we use B-splines to generate non-linear data?

October 15, 2017 |

I’m exploring the idea of adding a function or set of functions to the simstudy package that would make it possible to easily generate non-linear data. One way to do this would be using B-splines. Typically, one uses splines to fit a curve to data, but I thought it ...

### A minor update to simstudy provides an excuse to talk a bit about the negative binomial and Poisson distributions

October 4, 2017 |

I just updated simstudy to version 0.1.5 (available on CRAN) so that it now includes several new distributions - exponential, discrete uniform, and negative binomial. As part of the release, I thought I’d explore the negative binomial just a bit, particularly as it relates to the Poisson distribution. The Poisson ...

### CACE closed: EM opens up exclusion restriction (among other things)

September 27, 2017 |

This is the third, and probably last, of a series of posts touching on the estimation of complier average causal effects (CACE) and latent variable modeling techniques using an expectation-maximization (EM) algorithm . What follows is a simplistic way to implement an EM algorithm in R to do principal strata estimation ...

### A simstudy update provides an excuse to talk a little bit about latent class regression and the EM algorithm

September 19, 2017 |

I was just going to make a quick announcement to let folks know that I’ve updated the simstudy package to version 0.1.4 (now available on CRAN) to include functions that allow conversion of columns to factors, creation of dummy variables, and most importantly, specification of outcomes that are more flexibly ...

### Complier average causal effect? Exploring what we learn from an RCT with participants who don’t do what they are told.

September 11, 2017 |

Inspired by a free online course titled Complier Average Causal Effects (CACE) Analysis and taught by Booil Jo and Elizabeth Stuart (through Johns Hopkins University), I’ve decided to explore the topic a little bit. My goal here isn’t to explain CACE analysis in extensive detail (you should definitely ...

### Further considerations of a hidden process underlying categorical responses

September 4, 2017 |

In my previous post, I described a continuous data generating process that can be used to generate discrete, categorical outcomes. In that post, I focused largely on binary outcomes and simple logistic regression just because things are always easier to follow when there are fewer moving parts. Here, I am ...

### A hidden process behind binary or other categorical outcomes?

August 27, 2017 |

I was thinking a lot about proportional-odds cumulative logit models last fall while designing a study to evaluate an intervention’s effect on meat consumption. After a fairly extensive pilot study, we had determined that participants can have quite a difficult time recalling precise quantities of meat consumption, so we ...

### Be careful not to control for a post-exposure covariate

August 20, 2017 |

A researcher was presenting an analysis of the impact various types of childhood trauma might have on subsequent substance abuse in adulthood. Obviously, a very interesting and challenging research question. The statistical model included adjustments for several factors that are plausible confounders of the relationship between trauma and substance use, ...

### Should we be concerned about incidence – prevalence bias?

August 8, 2017 |

Recently, we were planning a study to evaluate the effect of an intervention on outcomes for very sick patients who show up in the emergency department. My collaborator had concerns about a phenomenon that she had observed in other studies that might affect the results - patients measured earlier in ...

### Using simulation for power analysis: an example based on a stepped wedge study design

July 9, 2017 |

Simulation can be super helpful for estimating power or sample size requirements when the study design is complex. This approach has some advantages over an analytic one (i.e. one based on a formula), particularly the flexibility it affords in setting up the specific assumptions in the planned study, such ...