Skip to content

Commit

Permalink
Update hrg.do
Browse files Browse the repository at this point in the history
  • Loading branch information
viyaasan committed Aug 28, 2024
1 parent 28778ec commit 7698fd4
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions analysis/hrg.do
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ log using ./logs/hrg_`dataset'.log, replace t
use ./output/`dataset'_ckd_complete.dta, clear
drop _merge
merge 1:1 patient_id using ./output/`dataset'_nockd_complete
replace ckd_group = 0 if ckd_group==1
replace ckd_group = 1 if ckd_group==0

cap file close tablecontent
Expand All @@ -28,13 +27,13 @@ qui safecount if ckd_group==`i' & `hrg'_count==1
local `hrg'_count_`i' = round(r(N),5)
qui su total_`hrg'_days if ckd_group==`i'
local `hrg'_days_`i' = r(mean)
}
if ``hrg'_count_`i'' >5 & ``hrg'_count_`i''!=. {
file write tablecontent _tab (``hrg'_count_`i'') _tab (``hrg'_days_`i'')
}
else {
file write tablecontent _tab ("REDACTED") _tab ("REDACTED")
}
}
file write tablecontent _n
}

Expand Down

0 comments on commit 7698fd4

Please sign in to comment.