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?
Double Machine Learning (DML) in STATA (xporegress command)Dear all, I am trying to use the command that STATA has for DML (Cross-fit partialing-out lasso lin…
Modelling wind direction and fire spreadI'm interested in finding whether wind direction is a good predictor of the direction of fire spread…
Create a new shared_border variableHi everyone, I am replicating a study. In the original study, the authors compare firms located in a…
Assigning Continuous number to year and monthsHi all, I have date like this: date jan2015 jan2015 feb2015 march2015 march 2015 march2015 I want…
times series data mergeHi I have 2 files that I want to merge and I want to create time-series data. I have one file with…
Subscribe to:
Post Comments (Atom)
0 Response to How can I put a vector variable into my regression?
Post a Comment