The last time a similar question was asked it was partially answered.
Similar to the example from the earlier question, here is the code
library(stargazer)
stargazer(attitude)
linear.1 <- lm(rating ~ complaints + privileges + learning, data=attitude[1:10,])
linear.2 <- lm(rating ~ complaints + privileges + learning, data=attitude[11:20,])
stargazer(linear.1, linear.2, title= "Regression Results", type = 'text', flip = TRUE)
i.e. Same model on two different dataframes (in this case different subsets).
Two requirements:
I want a table in which the estimate of only 'complaints' for linear.1 and linear.2 appear in one column (with se in parentheses) and stars for significance.
I also want to add a column for another linear model with different specification showing the same outputs for 'complaints' for each subset.
Apologies if anything is unclear, happy to clarify.