Hello Statalist.
I have a problem in a larger code I’m writing and it’s basically reduced to how I store the value of beta after reg in a single value.
If I do this:
My problem is that beta is stored as a matrix with both constant and beta and I don’t know how to refer to that specific value as I would with e(N). The reason for the replace is that it needs to work in a loop later on, so I need to be able to replace beta with many different coefficients... I just don’t know how to call beta as a single value. I tried parmest but that has the same problem; here I can store beta but can either save a dataset I can’t merge with the original or I can call a list that I can’t extract values from. Can I store the beta in a local or something?
I have a problem in a larger code I’m writing and it’s basically reduced to how I store the value of beta after reg in a single value.
If I do this:
Code:
gen beta=. reg y x replace beta=beta coef.
Comment