Skip to content

Commit

Permalink
Error amended
Browse files Browse the repository at this point in the history
  • Loading branch information
viyaasan committed Jun 21, 2024
1 parent 3891dd4 commit 2099bdf
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 64 deletions.
32 changes: 0 additions & 32 deletions analysis/descriptive_cca_asthma_ethnicity_2020.do
Original file line number Diff line number Diff line change
Expand Up @@ -705,36 +705,4 @@ file write tablecontent ("REDACTED") _tab
file write tablecontent _n
}

*COVID-19 wave
file write tablecontent ("COVID-19 wave") _n
forvalues wave=1/4 {
local label_`wave': label wave `wave'
file write tablecontent ("`label_`wave''") _tab
forvalues i=1/5 {
qui safecount if wave==`wave' & case==1 & ethnicity==`i'
local cases_`wave'_`i' = round(r(N),5)
local cases_`wave'_pc_`i' = (`cases_`wave'_`i''/`cases_`i'')*100
qui safecount if wave==`wave' & case==0 & ethnicity==`i'
local controls_`wave'_`i' = round(r(N),5)
local controls_`wave'_pc_`i' = (`controls_`wave'_`i''/`controls_`i'')*100
}
forvalues i=1/5 {
if `cases_`wave'_`i''>5 & `cases_`wave'_`i''!=. {
file write tablecontent %9.0f (`cases_`wave'_`i'') (" (") %4.1f (`cases_`wave'_pc_`i'') (")") _tab
}
else {
file write tablecontent ("REDACTED") _tab
}
}

forvalues i=1/5 {
if `controls_`wave'_`i''>5 & `controls_`wave'_`i''!=. {
file write tablecontent %9.0f (`controls_`wave'_`i'') (" (") %4.1f (`controls_`wave'_pc_`i'') (")") _tab
}
else {
file write tablecontent ("REDACTED") _tab
}
}
file write tablecontent _n
}
file close tablecontent
32 changes: 0 additions & 32 deletions analysis/descriptive_cca_cabg_ethnicity_2020.do
Original file line number Diff line number Diff line change
Expand Up @@ -705,36 +705,4 @@ file write tablecontent ("REDACTED") _tab
file write tablecontent _n
}

*COVID-19 wave
file write tablecontent ("COVID-19 wave") _n
forvalues wave=1/4 {
local label_`wave': label wave `wave'
file write tablecontent ("`label_`wave''") _tab
forvalues i=1/5 {
qui safecount if wave==`wave' & case==1 & ethnicity==`i'
local cases_`wave'_`i' = round(r(N),5)
local cases_`wave'_pc_`i' = (`cases_`wave'_`i''/`cases_`i'')*100
qui safecount if wave==`wave' & case==0 & ethnicity==`i'
local controls_`wave'_`i' = round(r(N),5)
local controls_`wave'_pc_`i' = (`controls_`wave'_`i''/`controls_`i'')*100
}
forvalues i=1/5 {
if `cases_`wave'_`i''>5 & `cases_`wave'_`i''!=. {
file write tablecontent %9.0f (`cases_`wave'_`i'') (" (") %4.1f (`cases_`wave'_pc_`i'') (")") _tab
}
else {
file write tablecontent ("REDACTED") _tab
}
}

forvalues i=1/5 {
if `controls_`wave'_`i''>5 & `controls_`wave'_`i''!=. {
file write tablecontent %9.0f (`controls_`wave'_`i'') (" (") %4.1f (`controls_`wave'_pc_`i'') (")") _tab
}
else {
file write tablecontent ("REDACTED") _tab
}
}
file write tablecontent _n
}
file close tablecontent

0 comments on commit 2099bdf

Please sign in to comment.