Dear All,
I have a huge dataset with a few hundred variables with 10000 observations each on my hand. Few of these variables are highly correlated wich causes problems when trying to analyse them with a logistic regression. As of yet i was not able to figure out how to loop over all of the returned matrix elements to drop them.
with
i can get all variables that need to be tested.
from the return matrix it should be possible to drop the affected variables structured somehow like this
I would be very thankful if anyone of you could point me to a solution to this problem. I know that this approach does not have a lot of friends in the statistical community but my professor insists on me using it.
Maxwell
(a new and really confused STATA user)
I have a huge dataset with a few hundred variables with 10000 observations each on my hand. Few of these variables are highly correlated wich causes problems when trying to analyse them with a logistic regression. As of yet i was not able to figure out how to loop over all of the returned matrix elements to drop them.
with
Code:
ds x1 x2 x3, not local all=r(varlist)
from the return matrix it should be possible to drop the affected variables structured somehow like this
Code:
correlate `all' if r(rho)>0.2 **drop variable**
Maxwell
(a new and really confused STATA user)
Comment