stata_use

Upload: igift-wattanatorn

Post on 06-Jul-2018

213 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/17/2019 STATA_USE

    1/11

    An Introduction to Stata

    Bhumisuk Khananurak

  • 8/17/2019 STATA_USE

    2/11

    Introduction to STATAIntroduction to STATA About STATAAbout STATA

    - Cross-section- Cross-section

      - Time series- Time series

      - Panel Data- Panel Data

    Basic OperationsBasic Operations- Descriptive- Descriptive

      * Tab* Tab

    e!ression Anal"sise!ression Anal"sis

  • 8/17/2019 STATA_USE

    3/11

    About

    STATA is modern and general command driven

    package for statistical analyses, data management

    and graphics. STATA provides commands to analyze panel data

    (cross-sectional time-series, longitudinal, repeated-

    measures, and correlated data), cross-sectional

    data, time-series data, survival-time data, cohort

    study,… 

    STATA is user friendly.

  • 8/17/2019 STATA_USE

    4/11

    #nterin! Data StatsTransfer rom other formats to

    Stata

  • 8/17/2019 STATA_USE

    5/11

    $se basic stata !lear

    Set mem

    Ta"

    Ta"#

    summarize

  • 8/17/2019 STATA_USE

    6/11

     Simple command$raph twoway scatter var1 var2 line  var1 var2 Graph bar var1 var2

    ename % Create &ariable rename  var1 newvar  gen newvar =var1 + var2

  • 8/17/2019 STATA_USE

    7/11

     Correlation  To obtain the correlation bet'een a set

    o( variables% t"pe)

    correlate varlist + [weight ]+

  • 8/17/2019 STATA_USE

    8/11

    ,inear re!ression  To per(orm a linear re!ression o( depvar  

    on varlist % t"pe)

    regress depvar  varlist  [weight ]+ if exp+ , noconstant robust+ depvar  is the dependent variable varlist  is the set o( independent

    variables .re!ressors/ B" de(ault Stata includes a constant

     The noconstant option e0cludes it

  • 8/17/2019 STATA_USE

    9/11

     #0ercise 1 2 use 3D)4T$4chula56le4monthl"testdta3%clear set mem 7889

    set matsize :88 set more off

    rename !(c(r invest reg

     e0port(obr 'tradinde0 reg invest dcredit reg invest !dpr

  • 8/17/2019 STATA_USE

    10/11

     Thank "ou

  • 8/17/2019 STATA_USE

    11/11

     #0ercise ; 2