[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: RE: RE: RE: Covariates in model

From   "Nick Cox" <>
To   <>
Subject   st: RE: RE: RE: Covariates in model
Date   Thu, 23 Jul 2009 11:35:26 +0100

No; I meant what I said. 

. global covariates : colnames beta

would have been an alternative for you. 


Xu, Haiyong

I thought -colnames- was used to set the names, not get the names,
wasn't it?
But -indeplist- get me what I need. Thanks a lot!

Nick Cox

Use -colnames- not -colfullnames-.

Also note Maarten Buis' -indeplist- from SSC.

Xu, Haiyong

I am running a model Y=beta0+beta1*X1+beta2*X2+beta3*X3+...+betan*Xn.
After running the model command, Stata automatically drops some
covariates because of colinearity. I want to get the final covariates
which are left in the model. What I did is something like this.
. reg y x1 x2 x3 x4 x5
. matrix beta = e(b)
. global covariates : colfullnames beta
Suppose x2 was dropped because of colinearity.
It gives me a global as
y:x1 y:x3 y:x4 y:x5 y:_cons
How can I remove "y:" in the global so that I have a global as "x1 x3 x4
x5 _cons"?

*   For searches and help try:

© Copyright 1996–2017 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index