Dear Altruistic,
I have data set in following format
Code:
* Example generated by -dataex-. To install: ssc install dataex
clear
input str2 SpecID str42 Orgid str1 Sex float(age1 Caldate) str1(Tetracycline Ampicillin Chloramphenicol)
"4"  "Escherichia coli"                "M"  35 16437 ""  "S" "" 
"23" "Shigella flexneri"               "M" .75 16437 ""  "S" "" 
"60" "Staphylococcus aureus"           "M"  30 16437 ""  "R" "R"
"4"  "Escherichia coli"                "F"  31 16437 ""  "R" "" 
"4"  "Escherichia coli"                "F"  55 16437 ""  "R" "" 
"4"  "Enterococcus faecalis"           "F"  31 16437 ""  "S" "" 
"1"  "Salmonella Typhi"                "M"   0 16437 ""  "R" "R"
"60" "Acinetobacter species"           "M"  30 16437 ""  ""  "" 
"23" "Shigella flexneri"               "M" .75 16437 ""  "S" "" 
"3"  "Vibrio cholerae O1 El Tor Inaba" "M"  20 16437 "S" ""  "" 
end
format %td Caldate
Data set comes from hospital surveillance with different human specimens, detected organisms, infected persons sex, age, antimicrobial status (S=sensitive and R= Resistant to specific antibiotic) and time variable Caldate. Here I have taken first 10 obs. so Caldate shows same date but in data set every day we have 30 to 40 samples for 13 years.
Now I want to produce time series plot to show trends, seasonal variation and other time series components using Caldate in X axis and Sex in Y axis (two different lines for two genders) in which Tetracycline="R".
I searched several sources but fail to get desired information. Anyone provide me proper code for above mentioned criteria.