Hi Statalist
This probably has a very simple solution but I am struggling to figure it out.
For a panel dataset, we can readily identify time-invariant & time-varying variables by -xtsum- and the time-invariant variables are those with a Within standard deviation of 0.
But is there a way to tag/identify those variables that are time-varying or invariant in such a way this identification can be used for later procedures? For example, suppose I want to -reshape wide- and instead of typing out -reshape wide <time-varying1> <time-varying2> <time-varying3>, i(id) j(time)- (there are >100 variables altogether) I can simply use the variables already tagged as time-varying.
The closest information I found is https://www.stata.com/support/faqs/d...ions-in-group/ but my question differs in that I am not looking to list observations within a column but to identify the whole column.
Thanks.
Related Posts with Tag time-invariant & time-varying variables in panel
Calculating 95% CI for median regression lineDear Stata users, I have generated restricted cubic splines (4 knots) for A, and then fit the median…
Error in Saving in old versionDear All Please help me solve this error data cannot be saved in old .dta format Data contain strL…
Area Under SROC Curve for Meta Analysis of Diagnostic Test Accuracy (DTA) StudiesI am working on a meta analysis of DTA studies. Using the command: metandi tp fp fn tn if testtype…
xtlogit,pa vs logisticHi, I'm a grad student with a moderate statistics background having a bit of trouble figuring out w…
Minimum detectable hazard ratio/relative riskHi all, Is there a way to calculate these in STATA? I am carrying out a study relating to medicatio…
Subscribe to:
Post Comments (Atom)
0 Response to Tag time-invariant & time-varying variables in panel
Post a Comment