My OLS model is
Pit = a + b1*stationit + b2*distanceit + b3*compnumit + r*Xi + s*Yi +eit
Here Xi, I want to put variables which can show characteristics of station i. (such as station brand dummy, operation system dummy..)
And for Yi, Region dummythat shows the region where the stationi locates.
I guess mkmat helps to make these vector variables but don't know the exact way to use.
mkmat brand1 brand2 brand3 operation1 operation2, matrix(X)
and then,
reg price station distance compnum X Y
doesn't work. How can I put vectors into my OLS?
Related Posts with How can I put a vector variable into my regression?
Sum up # of observations and output to spreadsheet/csvHello, I am trying to accumulate the number of observations for each dataset with a pattern of "con…
split (Chinese) addressDear All, I have this dataset. Code: * Example generated by -dataex-. To install: ssc install datae…
Clarifying the triple diff definition in generalized DiD?Hi all, I am examining the triple diff (diff-in-diff-in-diff)(DDD) in a staggered setting. Normally…
Creating cumulative frequency time series (overlay panels)Hi all, I have a data set of clients (unique ID) with their week of immunization and age group. Wha…
Accumulate ifDear, good night! See if anyone can give me a tip. I consulted and I'm not finding topics on the sub…
Subscribe to:
Post Comments (Atom)
0 Response to How can I put a vector variable into my regression?
Post a Comment