7

Comparing coefficients across segmented regression models given aggregated, hete...

 3 years ago
source link: https://stats.stackexchange.com/questions/530718/comparing-coefficients-across-segmented-regression-models-given-aggregated-hete
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client
Comparing coefficients across segmented regression models given aggregated, heterogenous data

Cross Validated is a question and answer site for people interested in statistics, machine learning, data analysis, data mining, and data visualization. It only takes a minute to sign up.

Sign up to join this community

Anybody can ask a question
Anybody can answer
The best answers are voted up and rise to the top
Asked 3 days ago
Active 2 days ago
Viewed 69 times

My goal is to compare β1 across 7 models:

Y1t=β0+β1X1t+ϵtY2t=β0+β1X1t+ϵt⋮Y7t=β0+β1X7t+ϵt, where the realizations of YLt is time series data and XLt is a binary variable for L=1,2,…,7, interpreted as a treatment.

I want to compare β1 across models to determine if the treatment had a heterogenous effect on YLt. To be concrete, the response variables are different types of crime.

The problem is the means and variances of Y1,Y2,…,Y7 vary greatly. For the sake of argument, suppose Avg(Y1)=100,Avg(Y2)=4, and ^β1=−25,^β2=−1. In terms of averages, the effect is the "same", but the coefficients are quite different. So a direct comparison becomes difficult if not untenable.

I have tried to identify some approaches to compare the treatment effects:

  1. Percent change

Using the pre-treatment average of YL, compute percent change PC=β1Avg(YL)⋅100, and compare those.

  1. Standardize YL

Using overall Avg / Std, or the pre-treatment Avg / Std, estimate the coefficients and make direct comparisons (perhaps using a hypothesis test of their difference).

  1. Z-test for difference of coefficients (or some other test)

  2. Seemingly unrelated regression

Ideally, I want to determine if the difference in effects is statistically significant or not.

asked Jun 14 at 22:03
New contributor

If willing to reparametrize the model, you might consider Poisson regression. So for Poisson regression we have:

E[Y1t]=exp(β01+β11X1t) E[Y2t]=exp(β02+β12X2t)

etc. for your stacked equations. Note that exp(β01+β11X1t)=exp(β01)⋅exp(β11X1t), and so in this formulation you get your proportional interpretation of the effects for β11, β12. (But I would still test for equality on the linear scale.)

For this simple of a model with all binary inputs on the right hand side, each of them will estimate the same expected value on the left hand side, it just changes the parameters and the nature of how you generalize across equations.

Stata has a program to do seemingly unrelated regression for glm's, see the suest command. Another way to do it though is to stack the equations, fit a single model, and do a likelihood ratio test for the restricted vs the model allowing the treatment effects to vary across the equations. Example below in R:

# Simulating two crime types
set.seed(10)
n <- 1000
t <- rep(0:1,n/2)
# crime type 1, ~10
l1 <- exp(2 + 0.5*t) 
c1 <- rpois(n,l1)
# crime type 2, ~130
l2 <- exp(4.6 + 0.5*t)
c2 <- rpois(n,l2)
# Prepping data
ctype <- rep(c("c1","c2"),each=n)
data <- data.frame(crime=c(c1,c2),treat=c(t,t),c=ctype)

# Linear regression
linmod <- lm(crime ~ c + treat:c - 1, data)
summary(linmod)

# Poisson regression
pmod <- glm(crime ~ c + treat:c - 1, family='poisson', data)
summary(pmod)

# Showing linmod and pmod give the same marginal predictions!
all.equal(predict(linmod),predict(pmod,type='response'))

# Restricted model with no treatment het
pmod_restrict <- glm(crime ~ c + treat - 1, family='poisson', data)
anova(pmod_restrict,pmod,test='LRT') #Fail to reject null
answered 2 days ago

Your Answer

Andrew is a new contributor. Be nice, and check out our Code of Conduct.

Sign up or log in

Sign up using Google
Sign up using Facebook
Sign up using Email and Password

Post as a guest

Name
Email

Required, but never shown

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged regression-coefficients or ask your own question.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK