/*************************************************************** --> Stata commands to calculate SIR-values with 95% --> confidence intervals for several cancer sites combined ***************************************************************/ * Stata clear set more off /*************************************************************** --> Reading data from internet ***************************************************************/ local f "astra.cancer.fi/NOCCA/Incidence/Results/All-tables.csv" insheet using http://`f', delim(";") names clear /************************************************************** --> User can select the cancer sites to combine by changing --> the inlist statement below. Example shows how to --> combine colon and rectal cancer for men, and tabulation --> of the combined results by occupation. List of cancer codes --> are given at the end of this file. ***************************************************************/ keep if gender == "Men" /* Men, Women */ keep if inlist( siteno , 13 ,14) /* 1..77,1..77, 1...77,...n*/ /************************************************************** --> Summarising obs and exp for each country by occupation. --> Calculating SIRs and 95% confidence intervals ***************************************************************/ collapse (sum) *obs *exp (first) occno , by(occtext) qui foreach c in den fin swe nor ice tot { generate `c'SIR = `c'obs / `c'exp generate `c'_SIR_lb = . generate `c'_SIR_ub = . forvalues i = 1/`=_N' { local `c'OBS = `c'obs[`i'] iri ``c'OBS' 100000 1 100000 /* get exact poisson limits */ replace `c'_SIR_lb = `r(lb_irr)' / `c'exp if _n == `i' replace `c'_SIR_ub = `r(ub_irr)' / `c'exp if _n == `i' } } /************************************************************** --> Sorting, formatting, and giving some examples of tabulation **************************************************************/ sort occno format %3.2f *SIR* format %3.1f *exp* format %-30s occtext list occno occtext tot* , noobs compress list occno occtext fin* , noobs compress qui{ /************************************************************** --> List of cancer sites *************************************************************** 1 lip cancer 2 cancer of the tongue 3 cancer of the salivary glands 4 cancer of the oral cavity 5 cancer of the pharynx 6 cancer of the oropharynx 7 cancer of the nasopharynx 8 oesophageal cancer 9 adenocarcinoma of the oesophagus 10 stomach cancer 11 cardia cancer 12 cancer of the small intestine 13 colon cancer 14 rectal cancer 15 liver cancer 16 hemangiosarcoma of the liver 17 cancer of the gallbladder 18 pancreatic cancer 19 nasal cancer 20 adenocarcinoma of the nose 21 laryngeal cancer 22 lung cancer 23 adenocarcinoma of the lung 24 small cell cancer of the lung 25 squamous cell cancer of the lung 26 other and unspecified lung cancer 27 mesothelioma in the pleura/peritoneum 28 breast cancer 29 ductal breast cancer 30 lobular breast cancer 31 cancer of the cervix uteri 32 cancer of the corpus uteri 33 choriocarcinoma 34 ovarian cancer 35 cancer of the fallopian tube 36 cancer of the vulva 37 vaginal cancer 38 prostate cancer 39 testicular cancer 40 testicular seminoma 41 testicular non-seminoma 42 cancer of the penis 43 kidney cancer 44 cancer of the renal pelvis 45 cancer of the bladder. ureter. and urethra 46 skin melanoma 47 skin melanoma. upper limbs 48 non-melanoma skin cancer 49 non-melanoma skin cancer. upper limbs 50 eye cancer 51 malignant melanoma of the eye 52 brain cancer 53 glioma 54 meningeoma 55 thyroid cancer 56 follicular thyroid cancer 57 papillary thyroid cancer 58 cancer of the glandula suprarenalis 59 cancer of the glandula parathyreioeda 60 cancer of the thymus 61 cancer of the hypophysis 62 cancer of the corpus pineale 63 bone cancer 64 chondrosarcoma 65 soft tissue cancer 66 fibrosarcoma 67 liposarcoma 68 other/unknown site 69 non-Hodgkin lymphoma 70 Hodgkin lymphoma 71 multiple myeloma 72 leukaemia 73 chronic lymphatic leukaemia 74 acute myeloid leukaemia 75 mycosis fungoides 76 borderline tumour of the ovary 77 all malignant neoplasms **************************************************************** --> End Stata do-file ***************************************************************/ }