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
First differencing and fixed effects?Dear all, I am working with a cross-section cross-time panel dataset with N = 15 (country) and T = …
Advice on interpretation of prtest (two sample test of proportion)Hello everybody, As a student assignment, we are conducting research on how different interventions…
consecutive failures in panel dataHi, I was hoping to get some advice on identifying consecutive failures in panel data. I am lookin…
Problem with capture confirm fileI have a folder containing some 70,000 systematically named files which I am going to merge into few…
how to check and address endogeneity issueHi.. I have one problem to identify and address endogeneity issue. I want to check relationship bet…
Subscribe to:
Post Comments (Atom)
0 Response to Categorizing values within a single variable via loop
Post a Comment