Good evening,
I am new to Stata and have been researching and consulting the help command on a problem with no luck.
I am trying to create a new variable "hour_groups" that categorizes the "hour" variable into 4 groups, e.g. 0 to 6 (a.m.) is assigned the number 1, 7 to 12 is assigned 2 and so on. I'm trying the foreach and and forvalues command. Any help is appreciated. Is it possible to generate a new variable while categorizing in the same command?
Related Posts with Categorizing values within a single variable via loop
How to make a random sample or subset of data with two group?I am new user of stata, kindly forgiven my ignorance and poor English. My case is here. I have a dat…
The occurance of autocorrelation and heteroscedasticity in a panel data OLS regressionHello everyone, I am currently running an OLS panel data regression with industry and time fixed ef…
Subgroup differences with metaprop? Hi, I am running a metanalysis to look at pooled estimates of attrition using metaprop. I have gen…
To make Trajectory Plot directly using WIDE data format without reshaping to long formatDear all, Is there any easy command or way to make a trajectory plot using WIDE format without resh…
reclink functionHi guys, hope you are enjoying festivities. So basically I am trying to perform a fuzzy matching b…
Subscribe to:
Post Comments (Atom)
0 Response to Categorizing values within a single variable via loop
Post a Comment