Changeset 20031 in main
 Timestamp:
 03/13/20 16:50:07 (2 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

adopters/mt/trunk/src/main/backend_qModules/birth23/test/MT_Average_data_frame.def
r20027 r20031 225 225 * 2a. If count > 20 ; 226 226 * Report count and rates with confidence intervals ; 227 * 2b. If count >20 ;227 * 2b. If count < 20 ; 228 228 * Suppress rates and counts ; 229 229 * ZWs program uses ".A" to identify cells for suppression. ; … … 235 235 * code at the end of this file to work. ; 236 236 *******************************************************************************; 237 238 **************** ASK LOIS ABOUT STDERR COMPUTATIONS ***************************;239 237 240 238 data tmp; … … 244 242 245 243 if popcount>=300 then do; 246 247 244 * Suppress cells if absolute count <5 ; 248 245 249 246 if 1<=count<5 then do; 247 n=.A; 250 248 mean=.A; 251 LL= .A;252 UL= .A;249 LL=put('**',8.0); 250 UL=put('**',8.0); 253 251 redflag=put('Suppressed', $15.); 254 n=.A; 255 end; 256 257 * do not compute rates based on fewer than 20 events, but provide counts; 252 end; 253 254 * do not compute rates based on fewer than 20 events, but provide counts; 258 255 259 256 if 5<=count<20 then do; 260 257 mean=.A; 261 LL= .A;262 UL= .A;258 LL=put('**',8.0); 259 UL=put('**',8.0); 263 260 redflag=put('Suppressed Avg', $16.); 264 261 end; 265 262 266 * for events >= 20 use binomial exact confidence intervals; 267 268 if count >= 20, then do; 269 LL=put(t1, 8.2); 270 LL=(1 – betainv (.975, popcount – count – 1, count))*100); 271 UL=((1 – betainv (.025, popcount – count, count + 1))*100); 272 LL=compress(LL); 273 UL=compress(UL); 263 * for events between 20 and 100, use T distribution to calculate confidence intervals; 264 * note LL and UL are calculated in step 4 above.; 265 266 if 20<=count<=100 then do; 267 274 268 redflag=put('', $15.); 275 end; 276 269 270 end; 271 272 * and normal approximation for more than 100 events. ; 273 * which is also computed in step 4 above; 274 275 if count>100 then do; 276 277 redflag=put('', $15.); 278 end; 277 279 end; 278 280 279 281 if popcount<300 then do; 280 282 281 * suppress if popcount <300 and count < 20 events .;283 * suppress if popcount <300 and count < 20 events; 282 284 283 285 if 1<=count<20 then do; 286 n=.A; 284 287 mean=.A; 285 LL= .A;286 UL= .A;288 LL=put('**',8.0); 289 UL=put('**',8.0); 287 290 redflag=put('Suppressed', $15.); 288 n=.A; 289 end; 290 291 292 * report rate and n if popcount <300 and count >= 20 events. ; 293 294 * for events >= 20 use binomial exact confidence intervals; 295 296 if count >= 20, then do; 297 LL=put(t1, 8.2); 298 LL=(1 – betainv (.975, popcount – count – 1, count))*100); 299 UL=((1 – betainv (.025, popcount – count, count + 1))*100); 300 LL=compress(LL); 301 UL=compress(UL); 291 end; 292 293 294 * report rate and n if popcount <300 and count >= 20 events; 295 296 if 20<=count<=100 then do; 297 * for events between 20 and 100, use T distribution to calculate confidence intervals; 298 * note LL and UL are calculated in step 4 above.; 299 300 redflag=put('', $15.); 301 302 end; 303 304 * and normal approximation for more than 100 events. ; 305 * which is also computed in step 4 above; 306 307 if count>100 then do; 308 302 309 redflag=put('', $15.); 303 310 end; … … 306 313 if count=0 then do; 307 314 mean=.A; 308 LL= .A;309 UL= .A;315 LL=put('**',8.0); 316 UL=put('**',8.0); 310 317 end; 311 318 312 319 if count<0 then do; 313 mean=0;314 320 mean=.A; 315 LL= .A;316 UL= .A;321 LL=put('**',8.0); 322 UL=put('**',8.0); 317 323 redflag=put('No Variance', $15.); *no variance; 318 324 end; … … 347 353 ********************************************************************; 348 354 BoNdArY 349 1 suppressed_variables 4355 1 suppressed_variables 2 350 356 mean 351 357 n 352 LL 353 UL 354 BoNdArY 358 BoNdArY
Note: See TracChangeset
for help on using the changeset viewer.