I run the following regressions:
Y_1 ~ c_1 + b_1*X
Y_2 ~ c_2 + b_2*X
and I get two estimates for b_1 and b_2. What is the appropiate statistic to test if b_1 <= b_2 and is there a function for that in R?
I run the following regressions:
Y_1 ~ c_1 + b_1*X
Y_2 ~ c_2 + b_2*X
and I get two estimates for b_1 and b_2. What is the appropiate statistic to test if b_1 <= b_2 and is there a function for that in R?
eq1 <- Y1 ~ X eq2 <- Y2 ~ X system <- list( morning = eq1 , afternoon = eq2)
OLS estimation
fitols <- systemfit( system, data = data) print(fitols)
The correct test
linearHypothesis(fitols, "morning_X - afternoon_X = 0" )
– LyxUser12345 Jan 03 '19 at 21:55Raccomplish this withsummary(lm(c(Y1,Y2) ~ c(X,X) + factor(rep(0:1, each=length(X)))))? – whuber Jan 03 '19 at 22:20