R Conditional Regression with Multiple Conditions
问题 I am trying to run a regression in R based on two conditions. My data has binary variables for both year and another classification. I can get the regression to run properly while only using 1 condition: # now time for the millions of OLS # format: OLSABCD where ABCD are binary for the values of MSA/UA and years # A = 1 if MSA, 0 if UA # B = 1 if 2010 # C = 1 if 2000 # D = 1 if 1990 OLS1000<-summary(lm(lnrank ~ lnpop, data = subset(df, msa==1))) OLS1000 However I cannot figure out how to get