Dear all,
I am using Stata 16, on mac. I have taken a snapshot on the panel dataset I am working with.
I used the following code:
generate mlda_21 = 0 if mlda<21
replace mlda_21 = 1 if mlda==21
to create the dummy variable mlda_21 which equals 0 if the minimum drinking age is less than 21 and equals 1 if the minimum drinking age is = to 21
I want to see how many states have a mlda of 21 for the year 1982. I was thinking of using the CountIf function?
Thank you in advance for your help
Jason Browen
Array Array Array
Related Posts with Help Using CountIf Function?
keep variable with condition and time seriesHi all: I want to keep variable use condition with next year and last year data. Sample ID YEA…
Forval loop invalid syntaxHello, I am using forval code as below and then it says it is 'invalid syntax'. I checked that all …
Multinomial Logit ModelingGreetings- I am looking for some advice on a multinomial logit model with marginal effects. The mod…
how to suppress display of the interval from -1 to 1 of x-axisHere is the code: Code: * Example generated by -dataex-. To install: ssc install dataex clear inpu…
Logistic regression with Effect Modification or Mantel-HaenszelHello. I'm trying to find an association between Sex of child and Exposure to or having a Defect fro…
Subscribe to:
Post Comments (Atom)
0 Response to Help Using CountIf Function?
Post a Comment