Hi,
I am trying to create a categorical variable of "activity". I want 0=<150 mins of activity. and 1=>/equal to 150mins of activity.
I have two continuous variable categories:
Moderate for which each frequency = 15 mins (e.g. 4 = 60 mins)
Strenuous for which each frequency = 30 mins (e.g. 4 = 120 mins)
I want the categorical variable to be able to be = 1 for any combination of the continuous variables that is >/equal to 150 mins or =0 if <150 mins of activity.
Is anyone able to help by providing some advice as to the type of commands which would be suited to this?
Thank you
Ben
Related Posts with Creating categorical variables with multiple different conditions from continuous variables
are there a quicker way to generate a variable?This thread continues from the below previous thread: https://www.statalist.org/forums/for...pping-…
how to do loop in stataHello, I have a question about how to do loop in Stata. Say, I have 1000 obs with id from 1 to 1000…
Creating observations from already existing observations in Stata Dear all, I have this type of Stata dataset where I want to create some observations splitting the…
Shifting up by a columnHi all, currently, I have two data of y for each country - y in 1988 and y in 2014. My goal is to ca…
CDC forumIs it just me? Or others also see the CDC forum on this board? (screenshot). I don't recall it being…
Subscribe to:
Post Comments (Atom)
0 Response to Creating categorical variables with multiple different conditions from continuous variables
Post a Comment