Contents. Setup Stata, etc. for Biostatistics Setup Notes... 2

Similar documents
Introduction to Stata Toy Program #1 Basic Descriptives

I Launching and Exiting Stata. Stata will ask you if you would like to check for updates. Update now or later, your choice.

You might think of Windows XP as a set of cool accessories, such as

Getting Started. Microsoft QUICK Source 7

SMART Recorder. Record. Pause. Stop

2 The Stata user interface

For additional information, please consult the Read-Me and Help documentation or contact Electro-Voice or Dynacord technical support.

Abacus 32 Windows Menu System

Introduction to Stata First Session. I- Launching and Exiting Stata Launching Stata Exiting Stata..

The QuickCalc BASIC User Interface

Windows 2000 Safe Mode

WINDOWS NT BASICS

Purchase and Setup instructions for SWVPS (Sept 15, 2014)

Using the Microsoft Remote Desktop on non-windows devices

Windows XP. A Quick Tour of Windows XP Features

Discovering Computers & Microsoft Office Office 2010 and Windows 7: Essential Concepts and Skills

Interface. 2. Interface Adobe InDesign CS2 H O T

Microsoft Access 2013

This book is about using Microsoft Excel to

ECDL Module 6 REFERENCE MANUAL

INSTALLING THE PS3 XBOX READY SOFTWARE:

Thermacam Reporter 2000 Professional Template Building Tutorial

Provides access to Worldspan Reservations Manager.

Mac OS X keyboard shortcuts Learn about common Mac OS X keyboard shortcuts.

Stata v 12 Illustration. First Session

GUIDE FOR STUDENTS AND PARENTS. An orange ring means you have an assignment.

Creating a Do File in Stata

Step 10: Conversion to PDF

Managing Content with AutoCAD DesignCenter

OU EDUCATE TRAINING MANUAL

Getting Started with Access

Double click the downloaded installation file (MPMLink.exe) to initiate the installation.

Enter your Appserv username and password to sign in to the Website

FirmSite Control. Tutorial

Introduction to IBM Rational HATS For IBM System i (5250)

The Fundamentals. Document Basics

Outlook 2003, Level 2 Page 1

Preparatory steps before you begin

Stata version 13. First Session. January I- Launching and Exiting Stata Launching Stata Exiting Stata..

Start Menu Log off Turn Off Computer Run Search Help and Support

Information Communications Technology (CE-ICT) 6 th Class

MAS 90/200 Intelligence Tips and Tricks Booklet Vol. 1

Microsoft Windows 10. Quick Reference. Watsonia Publishing 47 Greenaway Street Bulleen VIC 3105 Australia

Mehran Sahami Handout #5 CS 106A September 27, 2017 Downloading Eclipse

Managed Reporting Environment

How to Use Internet Explorer 9

Preparatory steps before you begin

WinSCP. Author A.Kishore/Sachin

AutoCAD 2009 User InterfaceChapter1:

Windows Me Navigating

Introduction to Eclipse Rich Client Platform Support in IBM Rational HATS. For IBM System i (5250)

Introduction to Microsoft Office 2016: Word

Manage Folders and Files in Microsoft Office. Mrs. Eggen and Ms. Miller GMS and HMS Digital Literacy

Basic Software Maintenance. Ham Station Ultra Software Package

Nauticom NetEditor: A How-to Guide

INSTALLATION INSTRUCTIONS FOR HAZUS-MHMR5

Tutorial 3 - Performing a Change-Point Analysis in Excel

W-E

Elixir Repertoire Designer

Introduction to Eclipse Rich Client Platform Support in IBM Rational HATS For IBM System i (5250)

Introduction to Personal Computers Using Windows 10 and Microsoft Office 2016

ACA 1095 Reporting - File Manager Overview. File Manager

BCI.com Sitecore Publishing Guide. November 2017

Fairfield University Using Xythos for File Storage

Oracle General Navigation Overview

2. Write Your Test Questions & Create Interactions Page 12

College of Pharmacy Windows 10

Part 1: Understanding Windows XP Basics

FIREFOX MENU REFERENCE This menu reference is available in a prettier format at

Data Grid Utilities - Searching Data Grids

Client Care Desktop V4

User Guide. Web Intelligence Rich Client. Business Objects 4.1

The PCC CIS etutorial to Windows

ezimagex2 User s Guide Version 1.0

MCDOUGAL LITTELL EASYPLANNER USER S GUIDE

Odyssey Quick Start. Quick Links: Launch Pad and Assignments Portfolio and Reports FAQs For Parents GUIDE FOR STUDENTS AND PARENTS

Insert Subtotals in Excel and Link Data to a Word Document

Display Systems International Software Demo Instructions

NiceForm User Guide. English Edition. Rev Euro Plus d.o.o. & Niceware International LLC All rights reserved.

Simply Accounting Intelligence Tips and Tricks Booklet Vol. 1

Roxen Content Provider

Outlook: Web Access. Outlook: Web Access AIS Vienna

Caja File Manager. Desktop User Guide

Portrait Editor. to Portrait Flow

Intermediate/Advanced. Faculty Development Workshop FSE Faculty retreat April 18, 2012

Horizon Launcher Configuration Guide

Software User's Guide

Client Care Desktop v4.3. Document Manager V4.3

Instructions for Use

Don t jump ahead, there is more you need to do first in order for this to work properly.

Using Styles In Microsoft Word 2002

Lab #1: Introduction to Basic SAS Operations

Section 2 Getting Started

Upgrading and Networking SK 7

Computer Basics Written by Brian O'Rooney. Copyright 2000 Nanaimo Literacy Association All rights reserved

Section 1 Microsoft Excel Overview

Introduction to MS Word XP 2002: An Overview

Sun VirtualBox Installation Tutorial

OS X keyboard shortcuts

Chapter 2 Autodesk Asset Locator... 3

Transcription:

Contents 1. Setup Notes... 2 Biostatistics 624 2006 by JHU Biostatistics Dept Sat, 25 Mar 2006 (6:04PM) Page 1

1. Setup Notes! These notes cover several How To issues related to Biostatistics 624 including Stata, PS sample size software, NCSS probability calculator, and the QuickCalc statistical calculator Setup course folder and select Windows options for folders (There is a separate handout for Mac users) Download files from the course website Customize Stata s Application windows Start Stata and set the working directory Create, run, and modify a Stata do-file Update Stata to latest version VERY IMPORTANT TO DO NOW Download the StataQuest menu system VERY HANDY Download the Epicalc menu system FOR EPIDMIOLOGIC CALCS FROM MENUS Download the PS sample size freeware by Dupont and Plummer Download the NCSS free probability calculator Access the QuickCalcs free statistical calculator Biostatistics 624 2006 by JHU Biostatistics Dept Sat, 25 Mar 2006 (6:04PM) Page 2

SET UP COURSE FOLDERS AND SELECT WINDOWS FOLDER OPTIONS 1. Open "My Documents" folder 2. Create subfolder "My Documents\bio624" 3. Create more subfolders: "My Documents\bio624\eq1" "My Documents\bio624\eq2" "My Documents\bio624\eq3" "My Documents\bio624\eq4" "My Documents\bio624\eq5" "My Documents\bio624\project" 4. Open "My Documents" and, from the Toolbar, select View / Details 5. Next, select Tools / Folder Options / View Check boxes: Display full path in address bar Display full path in title bar Uncheck box: Hide extensions of known file types Click "Apply to All Folders" Click OK Biostatistics 624 2006 by JHU Biostatistics Dept Sat, 25 Mar 2006 (6:04PM) Page 3

DOWNLOAD FILES FOR E-QUIZ 1 1. Use the Internet Explorer to go to the course website http://www.biostat.jhsph.edu/courses/bio624/ 2. Click "e-quizzes" 3. Enter the course userid and password -- given out with the class 1 website handout 4. Download the fem.dat raw data file (not a Stata dataset): Right click (DO NOT double click) the link to fem.dat Select "Save Target As..." Navigate to the "My Documents\bio624\eq1" folder Click Save 5. Download profile.do : Follow the same procedure as for fem.dat above Biostatistics 624 2006 by JHU Biostatistics Dept Sat, 25 Mar 2006 (6:04PM) Page 4

CUSTOMIZE STATA APPLICATION WINDOWS 1. Start Stata 2. Use the re-size controls on the corners of the overall Stata window and the windows within it to expand Stata to cover all or nearly all the desktop 3. Click the Control Menu icon -- upper left corner of Stata Results window -- and select Fonts Select the "Courier New" font Select "Bold" font style Set the font size to "9" Click OK -- experiment with other fonts/styles/sizes until satisfied 4. Click the "Prefs" Menu item Select "Manage Preferences -- Save Preferences B New Preference Set... " Enter your initials ow whatever Later, you can load your saved layout: Select "Manage Preferences BLoad Preferences" Click the Preference corresponding to your initials or whatever (save above) Note: You can also select Factory Settings, Maximized, or Compact Preferences, if you wish 5. Select the "s2color" look for graphs -- rather than the default Click the "Prefs -- Graph Preferences..." from the menu On the "General" tab: Change the "Scheme" Scheme to "s2color" Change the "Font" to "Arial" On the "Clipboard" tab: Select "Arial" font Select "Automatic" Color Changing Biostatistics 624 2006 by JHU Biostatistics Dept Sat, 25 Mar 2006 (6:04PM) Page 5

START STATA FOR e-quiz 1 1. Open the folder: "My Documents\bio624\eq1" 2. Double-click profile.do 3. Stata should start and run the commands in profile.do Note that the working directory, shown on the lower right side of the Stata window is the "eq1" folder If you are using Windows XP, you will see "c:\documents and Settings\username\My Documents\eq1" -- that's where Windows stores the "My Documents" folder Mac users: The name of the working directory does not show on on the lower left. To see the working directory name, shell dirs -l You will see: Users/your userid/documents/bio624/eq1" 4. To change the working directory when Stata is already running: (rarely needed if you Start Stata by double-clicking a do-file) Windows users: cd path... to folder Mac users: or, Much easier: File Change Working Directory from the menu. Navigate to the working folder and choose it cd path... to folder also works 5. Proceed with the commands and analyses shown in e-quiz 1 below Biostatistics 624 2006 by JHU Biostatistics Dept Sat, 25 Mar 2006 (6:04PM) Page 6

CREATE, RUN, AND MODIFY A DO-FILE The two most common ways to create a do file are: o Copy an existing do-file and make changes to suit the new task. o Use Stata interactively, then save the commands to a do-file from which you remove errors and/or unnecessary commands or add new commands To illustrate the creation of a do-file interactively do the following: 1. Start Stata -- double click profile.do in the...\eq1 folder 2. Enter some commands -- first few commands of e-quiz 1 for example, enter a few of these -- see the e-quiz for all the commands: clear -- always a good idea to clear the workspace infile id age iq anx depress sleep sex life weight using fem.dat label var life "Recent Suicide Thoughts" label define lifelab 1 "Without" 2 "With" describe codebook sort life by life: stem age by life: lv age by life: summarize age, detail tabstat age, by(life) statistics (n mean median sd sem q iqr min max) graph box age, over(life) marker(1,mlab(id)) 3. Save your commands in a do-file named test.do Biostatistics 624 2006 by JHU Biostatistics Dept Sat, 25 Mar 2006 (6:04PM) Page 7

Right click anywhere in the "Review" window Select "Save Review Contents" Navigate "My Documents\bio624\eq1" and save under the file name: test.do Mac Users: Use Control+Click instead of right click and Documents instead of My Documents 4. Open the do-file in the Do-file editor Click the Do-file editor on the toolbar -- little envelope Click the "Open" icon and navigate to the folder containing test.do Select the file and click "Open" -- commands should appear in the editor 5. To run the do-file: Click the "Do current file" icon -- the left icon of the two icons with down arrows. (The one one the right runs the commands, but only writes results to the log -- no commands) 6. You can now edit the do-file by changing or adding commands Note the Search and Seach/Replace options on the Do-file editor's "Search" menu -- very handy for making global changes such as variable names, etc. 7. You can run the whole do-file or highlight 1 or more commands and do only those -- click the same down arrow icon -- i.e., you can submit commands interactively, but from the do-file editor rather than the command window 8. You can enter commands interactively and then cut and paste them into the do-file 9. You can save commands in another file and add them into to do-file using the "File / Insert" option of the do-file editor. Biostatistics 624 2006 by JHU Biostatistics Dept Sat, 25 Mar 2006 (6:04PM) Page 8

10. Save the do-file. Exit Stata Re-start Stata by double-clicking the test.do do-file. This starts Stata, changes the working directory to the folder containing test.do, and then runs the do-file Biostatistics 624 2006 by JHU Biostatistics Dept Sat, 25 Mar 2006 (6:04PM) Page 9

UPDATE STATA 1. Start Stata 2. You can update the "ado" files, "executable" or both. "ado" files are (mostly) the Stata statistical commands and the "executable" is the kernel progran that controls the Stata system 3. You must have an open internet connection to do the updating 4. To see which, if any need updating, type: update query 5. Follow instructions for updating, or just type: update all If this is your FIRST update to Stata, use: update executeable update swap update all update swap 6. Follow instructions for "swapping" in the new executable update swap 7. When Stata restarts (it will do this automatically) type: update query -- should show that updates are not needed 8. In RARE CASES the "update swap" at the end of the process does not work for some reason. ONLY if this happens to you, there are two things to try: 1. Use "query update" to see if you need an update -- follow instructions for updating Start Stata and give the "update swap" command again. not make a Stata should shut down and then restart it automatically -- it takes a minute or so to complete. Type "udpate query" to see that no updates are now needed. If this does work for you, then try: 2. Change to the new version of Stata MANUALLY -- might want to have a TA walk you through this one, since there is a SLIGHT chance you could make Stata inaccessible, if you slip up. Instructions: 1. Exit Stata 2. Change to the folder where Stata was installed, usually C:\Program Files\STATA\ 3. Copy wstata.exe to wstata.old 4. Copy wstata.bin to wstata.exe (the date of wstata.bin must be newer than wstate.exe) 5. Start Stata 6. Issue "query update" to verify update was successful 7. Later, erase wstata.old if satisfied or copy wstata.old back to wstata.exe to return to the prior version 9. Other problems with the download? See: http://www.stata.com/support/faqs/web/errors.html DOWNLOAD THE STATAQUEST MENU SYSTEM 1. To download the free StataQuest menuing system, follow the instructions in the Class 1 class notes by starting Stata while connected to the internet: Biostatistics 624 2006 by JHU Biostatistics Dept Sat, 25 Mar 2006 (6:04PM) Page 10

net cd http://www.stata.com net cd quest7 net install quest1 net install quest2 net install quest3 Mac Users: Sorry, you are SOL on this one B ie, not available for Macs Test the download, by typing the command: quest on StataQuest menu should show under the "User" main menu (at the top) Also type: quest off Stataquest menu should disappear trom the "User" main menu 2. Download a Stata dataset for the demo into the "My Documents\bio624" folder: use alt3-1ex.dta (from Class 1) 3. Go through and click the options in all the StataQuest Menus, trying those of interest. 4. HIDDEN DIALOGS. Occasionally, Stata will appear to lock-up or freeze while running Stataquest. This is caused by a Dialog box that is hidden behind other windows. FIX: Drag the bottom of the "Results" window up until the dialog box shows. Click "Cancel" and then re-size the "Results" window Biostatistics 624 2006 by JHU Biostatistics Dept Sat, 25 Mar 2006 (6:04PM) Page 11

DOWNLOAD THE EPICALC MENU SYSTEM 1. To download the free Epicalc menuing system, follow the instructions in the Class 1 class notes or start Stata and type type the command findit sbe35 Click Click sbe35 Click here to install Test the download, by typing the command: calcmenu on Epicalc menu should show under the "User" main menu (at the top) Also type: calcmenu off Epicalc menu should disappear from the "User" main menu (at the top) Ignore the warning that StataQuest and Epicalc cannot be present together B they can in Stata 8 2. HIDDEN DIALOGS. Occasionally, Stata will appear to lock-up or freeze while running Stataquest. This is caused by a Dialog box that is hidden behind other windows. FIX: Drag the bottom of the "Results" window up until the dialog box shows. Click "Cancel" and then re-size the "Results" window Biostatistics 624 2006 by JHU Biostatistics Dept Sat, 25 Mar 2006 (6:04PM) Page 12

DOWNLOAD PS SAMPLE SIZE FREEWARE BY DUPONT AND PLUMMER 1. Browse to http://biostat.mc.vanderbilt.edu/twiki/bin/view/main/powersamplesize Click the link to download PS in the text portion of the window Follow the installation prompts, taking all the defaults Test the download, by starting PS from the Start Menu Try out the sample size problems from e-quiz 1 Note that clicking on terms in the PS display provides definitions for the terms Biostatistics 624 2006 by JHU Biostatistics Dept Sat, 25 Mar 2006 (6:04PM) Page 13

DOWNLOAD free NCSS probability calculator 1. Browse to the course home page wwww.biostat.jhsph.edu/courses/bio624/ Click "Other links" Click "Free Probability Calculator from NCSS" Click "Save" Save to the Desktop as "ncsscalc.zip" Create a folder under "My Documents" named "PROBCALC" Drab the "ncsscalc.zip" file into the "PROBCALC" folder Unzip the "ncsscalc.zip file into the PROBCALC folder Right click "ncsscalc.exe" Select "Create Shortcut" Drag the "Shortcut" onto the Desktop Start the calculator by double-clicking the "Shortcut" Test the download by trying: Prob(Z>=1.96) You should get 0.0249978952 Inverse Prob(0.9725) You should get 1.9599639846 Also test using the problems at the end of e-quiz 1 Inverse Prob(0.9725) You should get 1.9599639846 Also test using the problems at the end of e-quiz 1 Biostatistics 624 2006 by JHU Biostatistics Dept Sat, 25 Mar 2006 (6:04PM) Page 14

ACCESS the QuickCalcs free statistical calculator 1. Browse to the course home page wwww.biostat.jhsph.edu/courses/bio624/ Click "Other links" Click "Free Statistical Calculator" Try any of the calculator functions of interest to you Test the calculator by trying: Prob(Z>=1.96) You should get 0.0249978952 Inverse Prob(0.9725) You should get 1.9599639846 Other things to try: Randomize 40 patients to either treatment A or treatment B Generate a random sample of size 100 from a Normal distribution with mean 100 and SD=15 You should get 1.9599639846 Also test using the problems at the end of e-quiz 1 Biostatistics 624 2006 by JHU Biostatistics Dept Sat, 25 Mar 2006 (6:04PM) Page 15