0% found this document useful (0 votes)
15 views

Stata Workshop

This document summarizes a Stata workshop being conducted by Dr. Vinci Chow. The workshop will provide hands-on tutorials for using Stata for estimation tasks, with an emphasis on practical usage over theory. Notes and assignments will be available on Blackboard and a website. The workshop will focus on estimation rather than forecasting or prediction. It will review the pros and cons of Stata and introduce participants to SCRP, the high performance computing cluster at CUHK, including how to access and use their systems and storage. The document concludes with an example comparing odds ratios in logistic regression.

Uploaded by

hasan zahid
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views

Stata Workshop

This document summarizes a Stata workshop being conducted by Dr. Vinci Chow. The workshop will provide hands-on tutorials for using Stata for estimation tasks, with an emphasis on practical usage over theory. Notes and assignments will be available on Blackboard and a website. The workshop will focus on estimation rather than forecasting or prediction. It will review the pros and cons of Stata and introduce participants to SCRP, the high performance computing cluster at CUHK, including how to access and use their systems and storage. The document concludes with an example comparing odds ratios in logistic regression.

Uploaded by

hasan zahid
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 13

Stata Workshop

Dr. Vinci Chow


[email protected]
What is This Workshop About?
• A hands-on tutorial on using Stata for estimation
tasks
• Emphasize on practical usage instead of theory
• Notes and assignment:
• Blackboard (ECON4901-WORKSHOP)
• https://www.ticoneva.com/econ/stata-workshop/
• What is this not about?
• Forecasting/making accuracy predictions—find a
statistical learning/machine learning course for that
Estimation vs Prediction
Estimation: want 𝛽 to be accurate

𝑦 = 𝛼 + 𝛽𝑥

Prediction: want 𝑦 to be accurate

𝑦 = 𝐹(𝑥)
Prediction: might not care what 𝐹
looks like
Stata: Pros and Cons
✓ Widely use in economics
✓ Rich assortment of estimation procedures
✓ Consistent and easy-to-use syntax
✓ Excellent documentation
✓ Extendable. Many user-written packages online.

× Not free
× Before version 16, assumes user works with one
dataset at a time
× Lack modern statistical learning procedures
SCRP
High performance computing mini-cluster
managed by the Department of Economics.
Features:
• Remote access to R, Stata, Python and
MATLAB.
• Browser-based access to R, Python and
Stata.
• Daily onsite and offsite user file backup.
• Loads of computing power.

Website: https://scrp.econ.cuhk.edu.hk/
Account and Access
Step 1: Account Creation
Accounts should have been already been
created for you.

Step 2: Create Password


Follow instructions in account creation email.
Account and Access
Step 3: Connect to SCRP
Option 1: Web access for Python, R and Stata:
• https://scrp-login.econ.cuhk.edu.hk
• https://scrp-login-2.econ.cuhk.edu.hk
Option 2: SSH access:
• Windows – install MobaXterm.
Option 3: Remote Desktop
Access Method Comparison
Method Browser SSH Remote Desktop
• Works on all • GUI • GUI
devices • Fast • No software
• No software installation
Pros
installation required on
required Windows
• Fast
• No graphical • Requires VPN • Requires VPN
Cons user interface • Requires SSH • Uses a lot of
(GUI) software memory
Demo
Odds Ratio
Pr 𝑦 = 1 ∆𝑥 = 1
𝑜𝑑𝑑𝑠 𝑟𝑎𝑡𝑖𝑜 =
Pr 𝑦 = 1 ∆𝑥 = 0
Logit assumes this ratio is constant for all values of 𝑥.
Suppose the estimated ratio is 1.25. Also assume that when 𝑥 = 5,
Pr(𝑦) = 0.4 and when 𝑥 = 9, Pr 𝑦 = 0.8.
• In the first case, if 𝑥 increases by 1 to 6, an odds ratio of 1.25
Pr 𝑦|𝑥=6
means = 1.25, so Pr 𝑦|𝑥 = 6 = 1.25 × 0.4 = 0.5.
Pr 𝑦|𝑥=5
The increase is 10 percentage points.
• In the second case, if 𝑥 increases by 1 to 9, an odds ratio of
Pr 𝑦|𝑥=10
1.25 means = 1.25, so Pr 𝑦|𝑥 = 10 = 1.25 ×
Pr 𝑦|𝑥=9
0.8 = 1. The increase is 20 percentage points.
The percentage change is not constant!
A common practice is the report the percentage change at specific
intervals. e.g. at the average 𝑥 value.
Storage
SCRP has different
types of storage for
different purposes. ~
Key properties:
Home directory ~/
is reasonably fast
and backed up daily.
/data is very fast
but has no backup
and no redundancy. ~

*Quotas for undergraduate/postgraduate/faculty respectively.


Using Compute Nodes

You might also like