@@ -39,8 +39,8 @@ prog def eda
39
39
QFIT2(string asis) LOWess LOWess2(string asis) FPFIT FPFIT2(string asis) ///
40
40
LFITCi LFITCi2(string asis) QFITCi QFITCi2(string asis) FPFITCi ///
41
41
FPFITCi2(string asis) noBUBBLEplots noBOXplots noMOSAIC noHEATmap ///
42
- COMPile PDFLatex(passthru) BYGraphs(string asis) BYVars(varlist ) ///
43
- WEIGHTtype(passthru) ]
42
+ COMPile PDFLatex(passthru) BYGraphs(string asis) BYVars(passthru ) ///
43
+ BYSeq WEIGHTtype(passthru) ]
44
44
45
45
// Make the sample to use for the program
46
46
marksample edause, strok novarlist
@@ -437,15 +437,96 @@ prog def eda
437
437
438
438
} // End IF Block for correlation heatmap option
439
439
440
-
441
-
442
440
// If any graphs are going to be drawn
443
441
if `" `graphs'"' ! = " " {
444
442
445
443
// Change back to portrait page layout
446
444
file write doc " \end{landscape}" _n
447
445
448
446
} // End IF Block to reorient pages after graphs section
447
+
448
+ // Check for by graphs
449
+ if " `bygraphs'" ! = " " & " `byvars'" ! = " " {
450
+
451
+ // Check if user wants bargraphs
452
+ if " `bargraphs'" ! = " nobargraphs" & ! inlist(`catvarcount', 0, .) ///
453
+ & inlist(" bar" , `" `: subinstr loc bygraphs `" "' `"", ""''"' ) == 1 {
454
+
455
+ // Call Bar graph subroutine
456
+ edabar `categorical' if `edause', `bargraphopts' `byvars' ///
457
+ root(`root') bart(`bartype') `scheme' `keepgph' `byseq'
458
+
459
+ } // End IF Block for bar graph creation
460
+
461
+ // Check if user wants pie charts
462
+ if " `piecharts'" ! = " nopiecharts" & ! inlist(`catvarcount', 0, .) ///
463
+ & inlist(" pie" , `" `: subinstr loc bygraphs `" "' `"", ""''"' ) == 1 {
464
+
465
+ // Call Pie chart subroutine
466
+ edapie `categorical' if `edause', `piechartopts' ///
467
+ `scheme' `keepgph' root(`root') `byvars' `byseq'
468
+
469
+ } // End IF Block for pie charts option
470
+
471
+ // Add subheading to the LaTeX file
472
+ file write doc " \subsection{Continuous Variables} \newpage\clearpage" _n
473
+
474
+ // Check if user wants histograms
475
+ if " `histograms'" ! = " nohistograms" & ! inlist(`contvarcount', 0, .) ///
476
+ & inlist(" histogram" , `" `: subinstr loc bygraphs `" "' `"", ""''"' ) == 1 {
477
+
478
+ // Call histogram subroutine
479
+ edahist `continuous' if `edause', `histogramopts' `scheme' ///
480
+ `kdensity' kdensopts(`kdensopts') `fivenumsum' `byvars' ///
481
+ fnsopts(`fnsopts') root(`root') `byseq'
482
+
483
+ } // End IF Block for histograms
484
+
485
+ // Check for scatter plot option
486
+ if " `scatterplots'" ! = " noscatterplots" & ! inlist(`contvarcount', 0, .) ///
487
+ & inlist(" scatterplot" , `" `: subinstr loc bygraphs `" "' `"", ""''"' ) == 1 {
488
+
489
+ // Call to scatterplot subroutine
490
+ edascat `continuous' if `edause', `lfit' lfit2(`lfit2') ///
491
+ qfit2(`qfit2') `lowess' lowess2(`lowess2') `fpfit' ///
492
+ fpfit2(`fpfit2') `lfitci' lfitci2(`lfitci2') `qfitci' ///
493
+ qfitci2(`qfitci2') `fpfitci' fpfitci2(`fpfitci2') `qfit' ///
494
+ `scheme' `keepgph' root(`root') `byvars' `byseq'
495
+
496
+ } // End IF Block for scatter plots
497
+
498
+ // Check for bubble plots
499
+ if " `bubbleplots'" ! = " nobubbleplots" & ! inlist(`contvarcount', 0, .) ///
500
+ & inlist(" bubble" , `" `: subinstr loc bygraphs `" "' `"", ""''"' ) == 1 {
501
+
502
+ // Call subroutine for bubble plots
503
+ edabubble `continuous' if `edause', `scheme' `keepgph' ///
504
+ root(`root') `byvars' `byseq'
505
+
506
+ } // End IF Block for bubble plots
507
+
508
+ // Option to generate box plots
509
+ if " `boxplots'" ! = " noboxplots" & (! inlist(`contvarcount', 0, .) ///
510
+ & ! inlist(`catvarcount', 0, .)) ///
511
+ & inlist(" boxplot" , `" `: subinstr loc bygraphs `" "' `"", ""''"' ) == 1 {
512
+
513
+ // Create Box Plots
514
+ edabox if `edause', cat(`categorical') cont(`continuous') ///
515
+ `scheme' `keepgph' root(`root') `byvars' `byseq'
516
+
517
+ } // End IF Block for box plots
518
+
519
+ // Check for mosiac/spine plots
520
+ if " `mosaic'" ! = " nomosaic" & ! inlist(`catvarcount', 0, .) ///
521
+ & inlist(" mosaic" , `" `: subinstr loc bygraphs `" "' `"", ""''"' ) == 1 {
522
+
523
+ // Subroutine used to generate mosaic/spine plots
524
+ edamosaic `categorical' if `edause', `scheme' `missing' ///
525
+ `percent' `keepgph' root(`root') `byvars' `byseq'
526
+
527
+ } // End IF Block for mosaic plot creation
528
+
529
+ } // End IF Block for by graphs
449
530
450
531
// Create next section/subsection headers
451
532
file write doc " \chapter{Descriptive Statistics} \newpage\clearpage" _n
0 commit comments