I have a large data set that I am working on (120 GB). I would like to avoid generating new terms if I do not need to, to avoid making the dataset even larger.
Assume y is a continuous dependent variable, x and w are continuous independent variables, z is categorical
I know that I can save some space by using "#" and "##" in a regression rather than "gen x2 = x^2"
The following code:
will produce the same results as:
But the second version avoids generating a new "x2" term, and thereby saves space.
Is there a similar built in operator for generating the reciprocal of a variable?
Let's say I want to regress a version of y that is transformed by the inverse of w
Is there a way to produce the same results as the following regression without generating a new variable?
I am hoping there is something similar to the following
I have tried using "reg c.y#((c.w)^(-1))" and "reg y/w" with no luck ("Invalid Syntax", and "/ not allowed in a bound varlist")
Assume y is a continuous dependent variable, x and w are continuous independent variables, z is categorical
I know that I can save some space by using "#" and "##" in a regression rather than "gen x2 = x^2"
The following code:
Code:
gen x2 = x^2 regress y x x2 w i.z
Code:
regress y c.x##c.x w i.z
Is there a similar built in operator for generating the reciprocal of a variable?
Let's say I want to regress a version of y that is transformed by the inverse of w
Is there a way to produce the same results as the following regression without generating a new variable?
Code:
generate y_adj = y/w regress y_adj c.x##c.x i.z
Code:
regress y?w c.x##c.x i.z
Comment