Hello,
I am trying to create a Table in which you will see positive results (Serum=2) by age group ( agegroup = 1 and then 2, 3, etc...).
This is the first line of my code:
gen agegrouppositive= 1 if agegroup=1 & Serum=2
The syntax is invalid!
Can someone explain why? Can you help me? Thanks in advance
agegroup | Freq. Percent Cum.
------------+-----------------------------------
1 | a f k
2 | b g
3 | c h l
4 | d i m
5 | e j 100.00
------------+-----------------------------------
Total | x 100.00
Serum | Freq. Percent Cum.
------------+-----------------------------------
1 | a c e
2 | b d f
------------+-----------------------------------
Total | g 100.00
I am trying to create a Table in which you will see positive results (Serum=2) by age group ( agegroup = 1 and then 2, 3, etc...).
This is the first line of my code:
gen agegrouppositive= 1 if agegroup=1 & Serum=2
The syntax is invalid!
Can someone explain why? Can you help me? Thanks in advance
agegroup | Freq. Percent Cum.
------------+-----------------------------------
1 | a f k
2 | b g
3 | c h l
4 | d i m
5 | e j 100.00
------------+-----------------------------------
Total | x 100.00
Serum | Freq. Percent Cum.
------------+-----------------------------------
1 | a c e
2 | b d f
------------+-----------------------------------
Total | g 100.00

Comment