Home

Products

  • Overview of Stata
  • Why buy Stata?
  • Stata Journal
  • Stat/Transfer
  • Prices

    Australia

  • New purchases
  • Upgrade
  • Bookshop
  • GradPlan


  • New Zealand

  • NZ - New purchases
  • NZ - Upgrade
  • NZ - Bookshop
  • NZ - GradPlan
  • Support

  • Starting Stata
  • Stata tips - General
  • Stata tips - Graphs
  • Stata tips - Tables
  • Technical
  • Stata Courses & Training


  • Order form

    Quotation request

    Contact us


    Stata is a general-purpose statistical package for researchers of all disciplines.
    Epidemiology
    Longitudinal/Panel Data
    Multivariate Methods
    Survey Data
    Survival Analysis
    Time-Series
    Multiple Imputation
    Structural Equation Modelling





    and
    Statistics useful across other fields

    In addition, Stata produces publication-quality graphics, contains extensive data-management capabilities, and has a powerful matrix-programming language.


    What's New in Stata 12?

    Multiple imputation (MI) New Features Structural equation modeling (SEM) Contrasts and pairwise comparisons

    • Chained equations
    • Imputation of continuous,ordinal, cardinal, and count variables
    • Conditional imputation
    • Support for panel data and multilevel models and much more ..
    See Chained equations and more in multiple imputation in Stata 12: here
    • Path diagrams
    • Standardized and unstandardized estimates
    • Modification indices
    • direct and indirect effects and much more..
    See Blog article on SEM: here
    See Stata News article on SEM: here
    See Estimating and interpreting structural equation models in Stata 12: here
    Capabilities include:
    • Linear and nonlinear models
    • Comparison of means,intercepts or slopes
    • and much more ..
    New time series features Contour plots ROC analysis - expanded capabilities

    • Multivariate GARCH: including constant conditional correlations etc.
    • ARFIMA
    • UCM -- unobserved-components models
    • Time-series filters, including Christiano-Fitzgerald, Baxter-King band-pass filters, etc
    • Business calendars -
    See Stata News article: here

      Includes both filled and outlined plots

    • ROC adjusted for covariates and more ..
    New Excel import/export commands PDF Interface enhancements

    • Read and write worksheets from Microsoft Excel files, .xls and .xlsx.
    • New Import Preview tool

    • PDF export of results and graphs

    • New Properties window which lets you manage your variables, including their names, labels, value labels, notes, formats, and storage types.
    • Data Editor also has a new Properties window; has another tool that lets you Hide, Show, Filter, and Reorder the variables;
    • The Review and Variables windows support filtering

    Go here for a comprehensive overview of what's new in Stata 12.
    Go here for greater details on whats new in Stata 12.
    Go here to find out more about the capabilities of Stata 12.



    Stata/MP 12
    Stata/MP 12 is a version of Stata/SE that runs on multiprocessor computers, thus significantly reducing the time required to run your analysis. Stata/MP provides the most extensive support for multiple-processor computers and dual-core computers of any statistics and data-management package. Stata/MP can run on computers with 2,4,6,8,16,32 & 64 processors; with the appropriate licence.
    Go here for a comprehensive overview of Stata/MP 12.
    Stat/Transfer 11
    Now available
    Stata/Transfer is a program that facilitates the changing of file formats eg. a SPSS data file can be converted to a Stata data file
    Go here for details of Stat/Transfer 11.

    Recent  Releases
    Stata Journal The Stata Journal publishes articles, columns, and book reviews of interest to Stata users from beginners to Stata experts.
    To see the table of contents for Stata Journal Volume 11 Issue 2 (latest issue) go here
    Stata News
    Stata News Volume 26 No.1 has now been posted. If you would like a copy please contact us. The Stata News consists of important announcements about new products, upcoming releases, course dates, NetCourse information, and more. Go here to see the electronic version of the Stata News.
    Bookshop
    For books on Statistics and to help you learn Stata go here.




    Stata Tip

    Working with Dates 3

    A problem that comes up from time to time is where you have clustered dates eg. going to the doctor for treatment and subsequent follow up(s). You may wish to group each issue (intial treatment and follow up into a group). Without detailed records as to the ailment treated on which date you can attempt to do this by making an assumption as to how long the treatment is likely to last. For example you may have the following data:

    Assume that each treatment and follow up is no longer than 30 days.

    
    
    clear
    set more off
    
    input ///
    str6 id  str20 date
    01003	07Nov2008
    01003	07Nov2008
    01003	11Nov2008
    01007	22Dec2008
    01007	05Dec2008
    01007	13Nov2007
    01007	14Nov2007
    01007	22Jul2006
    01007	22Jul2006
    01007	22Jul2006
    01007	11Sep2006
    01009	13Oct2005
    01009	17May2006
    01009	17May2006
    01009	13Jan2010
    01009	06Jun2010
    01008	08Nov2007
    01008	08Nov2007
    01008	08Nov2007
    01008	15Jul2009
    01008	15Jul2009
    01008	15Jul2009
    01008	27May2010
    01008	28May2010
    01008	28May2010
    01008	28May2010
    end
    l
    
    generate date1=date(date, "DMY")                                      //1
    generate cluster=.                                                    //2
    list, sepby(id)
    
    tempvar max                                                           //3 
    bysort id (date1): gen `max'=_N                                       //4
    summarize `max'                                                       //5
    
    
    forvalues i=1/`r(max)' {                                              //6   
    bysort id (date1): replace cluster=`i' if ///                         //7
    date1<=(date1[sum(cluster!=.)+1]+30) & cluster==.  
    list, sepby(id)               // list command to show what is happening
                                  // can be removed
    }
    list, sepby(id)
    
    exit
    
    
    
    
    Going through the above:

    (1) generate a new variable (date1) that takes the date in string format from date and converts this into elasped time (a numeric value)

    (2) generate a new variable called cluster; all values equal to missing (.)

    (3) Assigns name to temparory variable max

    (4) Using the bysort prefix, by every level of id the values of the temporary variable max is generated and filled with values of _N. Note macro subsittion single brackets around the temporary variable name. _N stands for the max number of observations. In this case, because of bysort, it is the max number of observation for each level of id.

    (5) The summarize command is used to obtain the max number of obseravations in all the levels of max. The summarize command has a handy return value that stores this eg. r(max). To see the other values returned by this command type: return list (after the summarize command)

    (6) looping over the code in the curly brackets using forvalues loop

    (7) using the bysort command replace the value of cluster with the looping index value (this will be the group number) if the qualifer is true ie. the start of the next cluster and within 30 days of the start of the new cluster.

    Breaking the qualifer down: date1<=(date1[sum(cluster!=.)+1]+30) & cluster==.

    cluster!=. logical statement either true of false ie if cluster does not equal (!=) a missing value (.) the observation is true and equals 1 (one)
    sum(cluster!=.) : sums the results of cluster!=.

    +1: add 1 (one) to the result of the sum(cluster!=.)
    date1[sum(cluster!=.)+1]:inside the square brackets (explicit subscripting) Stata has calculated the observation number of date1 that we require eg. data1[obs no]. Stata gets the data for the variable date1 (a date) and adds 30 days to this. Stata then tests if the current observation of date1 is <= to the value calculated by date1[sum(cluster!=.)+1]+30) and also that the current value of cluster if missing (.). If the statement is true the looping index value (`i') replace the current value for observation of cluster.


    For help on specific commands type:
    help
    and then the specific command eg.
    help input
    help generate
    help summarize
    (the saved results from the summarize command can be seen be typing: return list after the summarize command
    help macro
    help forvalues
    help sum()
    help tempvar
    help list




    Contact details
    Karl and Helen Keesman,
    Survey Design and Analysis Services Pty Ltd,
    PO Box 1206,
    Blackburn North, Victoria 3130
    Phone: 03 9878 7373
    Fax: 03 9878 2345
    Mob. 0431 839 546

    International:
    Phone: +61 3 9878 7373
    Fax: +61 3 9878 2345

    Email: sales@survey-design.com.au
    ABN 37 051 831 826

    If our office is not attended, please leave your message as well as your phone number or Email address on our answering machine. You can send an Email or fax at any time and we will attend to it as soon as we can.

    *********************************************************************************************
    Survey Design and Analysis Services Pty/Ltd

    Our company is:

    • The Australian & New Zealand distributors for StataCorp. Stata is an integrated suite of software for data management, statistical analysis and graphics, and is available for Windows, Macintosh, and UNIX computers. Stata is used by medical researchers, biostatisticians, epidemiologists, economists, sociologists, political scientists, geographers, psychologists, social scientists, and other research professionals needing to handle and analyse data.
    • The Australian & New Zealand distributors for Stat/Transfer (Circle Systems). Stat/Transfer handles the transfer of data between a wide range of data formats.

    ********************************************************************************************



    'Stata is a registered trademark of StataCorp LP, College Station, TX, USA, and the Stata logo is used with the permission of StataCorp.'