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?
CTRL+F in browse mode not working properlyHi all, I am using a dataset with Greek characters. I've noticed that when I do a ctrl+f in browse …
displaying 14-digit numeric variable (double) in tab and codebook commandsHello, I have a 14-digit numeric variable, named 'year_id' (type double), which I would like STATA …
Generate vars with conditions inside a loopHi, I have a question, why the next sintaxis(with conditions) is not possible? foreach i of numlis…
How to Calculating time difference between visits in a panel dataI hope this finds you well. I kindly need your help to calculate the time difference(Months, Years …
Odd Stata/Mata bug when using xtreg, fe in a program together with Mata views under version controlUnder Stata 15.1, I experienced an odd behavior in a program that I have written. I first created a …
Subscribe to:
Post Comments (Atom)
0 Response to How can I put a vector variable into my regression?
Post a Comment