Publications by Your name here

시범

16.05.2023

Write text and code here. 연구 목적 및 배경 설명 완성된 문장으로 제출하기!(설명형식) What is (are) your main question(s)? What is your story? What does the final graphic show? 데이터에 대한 개괄적인 설명 Explain where the data came from, what agency or company made it, how it is structured, what it shows, etc...

700 sym

Recovering Marginal Effects and Standard Errors from Interaction Terms in R

05.03.2012

When I fit models with interactions, I often want to recover not only the interaction effect but also the marginal effect (the main effect + the interaction) and of course the standard errors. There are a couple of ways to do this in R but I ended writing my own function (essentially a wrapper around the deltaMethod() function) to fit my needs. ...

2153 sym R (1237 sym/1 pcs)

Recovering Marginal Effects and Standard Errors of Interactions Terms Pt. II: Implement and Visualize

09.03.2012

In the last post I presented a function for recovering marginal effects of interaction terms. Here we implement the function with simulated data and plot the results using ggplot2.   #---Simulate Data and Fit a linear model with an interaction term y<-rnorm(100,5,1) x<-rnorm(100,5,1) d<-data.frame(y=y,x=x,fac=sample(letters[1:3],100,replace=T))...

589 sym R (1245 sym/1 pcs) 2 img