Modify the Macro Put legend of the figure Change the figure screen size Format the rate with 2 decimals Refine title of table and figure by the.

Slides:



Advertisements
Similar presentations
Summary Statistics/Simple Graphs in SAS/EXCEL/JMP.
Advertisements

MS-Access XP Lesson 1. Introduction to MS-Access Database Management System Software (DBMS) Store data in databases Database is a collection of table.
Statistical Methods Lynne Stokes Department of Statistical Science Lecture 7: Introduction to SAS Programming Language.
Why ROOT?. ROOT ROOT: is an object_oriented frame work aimed at solving the data analysis challenges of high energy physics Object _oriented: by encapsulation,
Chapter 3: Editing and Debugging SAS Programs. Some useful tips of using Program Editor Add line number: In the Command Box, type num, enter. Save SAS.
1 CA202 Spreadsheet Application Combining Data from Multiple Sources Lecture # 6.
Georgia Institute of Technology DrJava Appendix A Barb Ericson Georgia Institute of Technology May 2006.
Integrating Access with the Web and with Other Programs.
Automating Tasks With Macros
Chapter 2: The Visual Studio.NET Development Environment Visual Basic.NET Programming: From Problem Analysis to Program Design.
7/17/2009 rwjBROOKDALE COMMUNITY COLLEGE1 Unix Comp-145 C HAPTER 2.
“SAS macros are just text substitution!” “ARRRRGGHHH!!!”
1 Chapter 3: Macro Definitions 3.1 Defining and Calling a Macro 3.2 Macro Parameters 3.3 Macro Storage (Self-Study)
Digital Image Processing Lecture3: Introduction to MATLAB.
Objectives Understand what MATLAB is and why it is widely used in engineering and science Start the MATLAB program and solve simple problems in the command.
IPC144 Introduction to Programming Using C Week 1 – Lesson 2
Automating Database Processing Chapter 6. Chapter Introduction Design and implement user-friendly menu – Called navigation form Macros – Automate repetitive.
CPSC1301 Computer Science 1 Overview of Dr. Java.
Linux Operations and Administration
What is MATLAB? MATLAB is one of a number of commercially available, sophisticated mathematical computation tools. Others include Maple Mathematica MathCad.
Active-HDL Interfaces Debugging C Code Course 10.
Getting Started with MATLAB 1. Fundamentals of MATLAB 2. Different Windows of MATLAB 1.
FIX Eye FIX Eye Getting started: The guide EPAM Systems B2BITS.
1 EPIB 698E Lecture 1 Notes Instructor: Raul Cruz 7/9/13.
Introduction to SAS Macros Center for Statistical Consulting Short Course April 15, 2004.
11/25/2015Slide 1 Scripts are short programs that repeat sequences of SPSS commands. SPSS includes a computer language called Sax Basic for the creation.
Lecture 20: Choosing the Right Tool for the Job. What is MATLAB? MATLAB is one of a number of commercially available, sophisticated mathematical computation.
1.Introduction to SPSS By: MHM. Nafas At HARDY ATI For HNDT Agriculture.
Chapter 3 I Need a Tour Guide (Introduction to Visual Basic 2010) Clearly Visual Basic: Programming with Visual Basic nd Edition.
NET 222: COMMUNICATIONS AND NETWORKS FUNDAMENTALS ( NET 222: COMMUNICATIONS AND NETWORKS FUNDAMENTALS (PRACTICAL PART) Tutorial 2 : Matlab - Getting Started.
Visual Basic Integrated Development Environment (IDE) 56:150 Information System Design.
XP New Perspectives on Microsoft Office Access 2003, Second Edition- Tutorial 8 1 Microsoft Office Access 2003 Tutorial 8 – Integrating Access with the.
1 Week # 4 Introduction to PDM PDM is a workbench environment that lets programmers and system operators navigate the three levels of the AS/400’s object-based.
Prepared by the Academic Faculty Members of IT. Tables Creating Tables. Merging Cells. Splitting Cells. Sorting Tables. Performing Calculations.
1 EPIB 698C Lecture 1 Instructor: Raul Cruz-Cano
Microsoft Excel Consolidation. Contents Introduction to Multiple Workbook Applications Working with Multiple Workbook Applications using normal keyboard.
Hints and Tips SAUSAG Q SORTING – NOUNIQUEKEY The NOUNIQUEKEY option on PROC SORT is a useful way in 9.3 to easily retain only those records with.
MATLAB The name of MATLAB stands for matrix laboratory. Starting a MATLAB Session -On Microsoft® Windows® platforms, start the MATLAB program by double-clicking.
Chapter 3: I Need a Tour Guide (Introduction to Visual Basic 2012)
UNIX To do work for the class, you will be using the Unix operating system. Once connected to the system, you will be presented with a login screen. Once.
Appendix A Barb Ericson Georgia Institute of Technology May 2006
Getting Started with Application Software
Release Numbers MATLAB is updated regularly
SQL and SQL*Plus Interaction
Appendix A Barb Ericson Georgia Institute of Technology May 2006
Data Visualizer.
SQL MODELER - OPEN There are Three Ways to open the SQL Modeler
Product Retrieval Statistics Canada / Statistique Canada Title page
Microsoft FrontPage 2003 Illustrated Complete
Outline Matlab tutorial How to start and exit Matlab Matlab basics.
3 Macro Storage.
Chapter 1: Introduction to SAS
Instructor: Raul Cruz-Cano
Fall 2017 Questions and Answers (Q&A)
Lesson 1 – Chapter 1B Chapter 1B – Terminology
Use of Mathematics using Technology (Maltlab)
Macro Variable’s scope
Microsoft Office Access 2003
Global and Local Symbol Tables
Microsoft Office Access 2003
Digital Image Processing
Macro Project: Automatic Reporting System
Tutorial 6 PHP & MySQL Li Xu
Stata Basic Course Lab 2.
Scripts In Matlab.
Getting started – Example 1
Instructor: Raul Cruz 9/4/13
Introduction to Excel 2007 Part 3: Bar Graphs and Histograms
Workshop for Programming And Systems Management Teachers
Presentation transcript:

Modify the Macro Put legend of the figure Change the figure screen size Format the rate with 2 decimals Refine title of table and figure by the caption of variable (not the variable name, such as edu) Change the x-axis to real years Flexible on generating any years report

Issues: WARNING: Apparent invocation of macro BOXPLOT not resolved. WARNING: This CREATE TABLE statement recursively references the target table. A consequence of this is a possible data integrity problem. Data allstas – change label 1,2,3 to real levels Two decimal for rate Create Legend Automatic run Matlab and latex

4 corrections proc sql; create table _sta&year as select " "||L.&predictor length=9, sum(bvs.total) as totn, sum(bvs.&outcome) as outn from fl.s&year as bvs LEFT JOIN fl.VARLEVELS as L ON bvs.&predictor = L.level group by L.&predictor union select "Statewide" as &predictor, sum(total) as totn, sum(&outcome) as outn from fl.s&year; create table sta&year as select *, round(outn/totn*100,0.01) as rate from _sta&year; Corrections: - real levels - round up rate with 2 decimals - use _sta&year to solve a warning - WHY: - length=9 - " "||L.&predictor - _sta&year

Matlab legend bar(rand(5,2)); s={'Male','Female'}; legend(s,'Location','SouthOutside','Orientation','horizontal');

Legend data _NULL_; file "&outputfile..m"; /*Overwrite old file (no option mod)*/ put "function main"; put; put "draw_all;"; put; put "function draw_one(x, figfilename, s)"; put; put '%bar chart '; put "y=x';f1=bar(y(:,[3:3:size(y,2)]));"; put "legend(s,'Location','SouthOutside','Orientation','horizontal');"; put "set(gcf, 'PaperPosition', [0.25 2.5 8 3]);"; put "set(gcf, 'Position', [360 453 600 261]);"; put "print(gcf, '-deps', figfilename);close(gcf)"; put; put "function draw_all"; put;

Legend proc sql; create table _aaa_ as select distinct &predictor from allstas; select compress("'"||&predictor||"'") into :slegend separated by "," from _aaa_; data _NULL_; set allstas end=final; file "&outputfile..m" MOD; tab=" "; if _N_=1 then do; put "x=["; end; put &allyeardata; if final then do; put "];";put; put "draw_one(x, 'fig&outcome.&predictor..eps', {&slegend});"; put; run;

Table column’s head %MACRO data2latex (data, varlist, outputfile, caption); %local i; %let vartab=; %let vartabhead=; %let i=1; %let thisvar=%scan(&varlist, &i); %let cccs=c; %do %until (AA&thisvar=AA); %let vartab=&vartab &thisvar tab; %if %substr(&thisvar,1,3)=sta %then %let thisyear=%substr(&thisvar,4,4); %else %let thisyear=&thisvar; %let vartabhead = &vartabhead "&thisyear" tab; %let i=%eval(&i+1); %let cccs=&cccs c; %end; ……………………..

X-Label (eg. 1992-2001) data _NULL_; file "&outputfile..m"; /*Overwrite old file (no option mod)*/ put "function main"; put; put "draw_all;"; put; put "function draw_one(x, L, figfilename, s)"; put; put '%bar chart '; put "y=x';f1=bar(L, y(:,[3:3:size(y,2)]));"; put "legend(s, 'Location','SouthOutside','Orientation','horizontal');"; ………………. …………………………………………… if final then do; put "];";put; put "draw_one(x,[&startYear:&endYear], 'fig&outcome.&predictor..eps', {&slegend});"; put; end; run; %mend dostats;

Issues an operating-environment command from within a SAS session In a windowing session, the X command works exactly like the X statement except that you issue the command from a command line. You submit the X statement from the Program Editor window. The X statement is similar to the SYSTEM function, the X command, and the CALL SYSTEM routine. In most cases, the X statement, X command or %SYSEXEC macro statement are preferable because they require less overhead. However, the SYSTEM function can be executed conditionally. The X statement is a global statement and executes as a DATA step is being compiled.

Matlab-List of Startup Options for Windows Platforms. Description /c licensefile Set LM_LICENSE_FILE to licensefile. It can have the form port@host. /logfile logfilename Automatically write output from MATLAB to the specified log file. /minimize Start MATLAB with the desktop minimized. Any desktop tools or documents that were undocked when MATLAB was last closed will not be minimized upon startup. /nosplash Start MATLAB without displaying the MATLAB splash screen. /r MATLAB_file Automatically run the specified MATLAB M-file, either commands supplied with MATLAB or your own M-files, immediately after MATLAB starts. This is also referred to as calling MATLAB in batch mode. Separate multiple commands with commas or semicolons (;). M-files must be on the MATLAB path or in the MATLAB startup directory. Do not include the pathname or a file extension.

Matlab - List of Startup Options for UNIX Platforms. Description -h or -help Display startup options (without starting MATLAB). -logfile log Automatically write output from MATLAB to the specified log file. -nodesktop Start MATLAB without bringing up the MATLAB desktop. Use this option to run without an X-window, for example, in VT100 mode, or in batch processing mode. Note that if you pipe to MATLAB using the > constructor, the nodesktop option is used automatically. With nodesktop, you can still use most development environment tools by starting them via a function. For example, use preferences to open the Preferences dialog box and helpbrowser to open the Help browser. Do not use nodesktop to provide a command line interface. If you prefer a command line interface, select Desktop > Desktop Layout > Command Window > Only. -nosplash Start MATLAB without displaying the splash screen during startup. -r MATLAB_command Automatically run the specified MATLAB M-file, either commands supplied with MATLAB or your own M-files, immediately after MATLAB starts. This is also referred to as calling MATLAB in batch mode. Separate multiple commands with commas or semicolons (;). M-files must be on the MATLAB path or in the MATLAB startup directory. Do not include the pathname or a file extension.

Automatic Run Matlab and Latex x '"C:\Program Files\MATLAB71\bin\win32\MATLAB.exe" -r "cd c:\; a; exit;"'; x 'cmd.exe /C "cd c:\ && latex c:\a.tex && dvipdfm c:\a.dvi"'; /*x 'cmd.exe /K "cd c:\ &&latex c:\a.tex&&dvipdfm c:\a.dvi"';*/