https://github.com/andyphilips/mkduration
Stata command to create duration variable with binary cross-sectional time series data
Science Score: 23.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
○codemeta.json file
-
○.zenodo.json file
-
✓DOI references
Found 1 DOI reference(s) in README -
○Academic publication links
-
✓Committers with academic emails
1 of 2 committers (50.0%) from academic institutions -
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (9.8%) to scientific vocabulary
Keywords
bcsts
duration-models
panel-data
stata
Last synced: 6 months ago
·
JSON representation
Repository
Stata command to create duration variable with binary cross-sectional time series data
Basic Info
Statistics
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
- Releases: 0
Topics
bcsts
duration-models
panel-data
stata
Created over 6 years ago
· Last pushed about 5 years ago
https://github.com/andyphilips/mkduration/blob/master/
# mkduration Stata command to create duration variable with binary cross-sectional time series data ## Description `mkduration` is a Stata command to generate a duration variable for duration/event history data where the data are xtset and in long format. In other words, given CSTS-style data for i units observed over t time periods, and where there is some dichotomous variable (where "1" indicates the instance of an event, and "0" indicates an absence): | Unit | Time | Event | |------|------|-------| | 1 | 1 | 0 | | 1 | 2 | 0 | | 1 | 3 | 1 | | 1 | 4 | 0 | | 1 | 5 | 1 | | 2 | 1 | 0 | | 2 | 2 | 1 | | 2 | 3 | 0 | | 2 | 4 | 0 | | 2 | 5 | 0 | `mkduration` will generate a duration variable: | Unit | Time | Event | Duration | |------|------|-------|----------| | 1 | 1 | 0 | 1 | | 1 | 2 | 0 | 2 | | 1 | 3 | 1 | 3 | | 1 | 4 | 0 | 1 | | 1 | 5 | 1 | 2 | | 2 | 1 | 0 | 1 | | 2 | 2 | 1 | 2 | | 2 | 3 | 0 | 1 | | 2 | 4 | 0 | 2 | | 2 | 5 | 0 | 3 | More information is available in the help file. ## Examples and Citing You can see more details in the [Stata Journal article](https://journals.sagepub.com/doi/10.1177/1536867X20976322), or the [ungated version](https://github.com/andyphilips/mkduration/blob/master/Philips-2020-SJ.pdf). If you use `mkduration` in your own work, I'd love it if you cited me: * Philips, Andrew Q. 2020. "An easy way to create duration variables in binary cross-sectional time series data." The Stata Journal 20(4): 916-930. ## Install The easiest way to install `mkduration` is by directly typing into Stata: ``` net install st0621 net get st0621 ``` Alternatively, you can install `mkduration` directly from GitHub if you're connected to the internet: ``` capture ado uninstall mkduration net install mkduration, from(https://github.com/andyphilips/mkduration/raw/master/src/) ``` Last, you can download the files from the source folder and either call directly to the .ado files or place them in your "ado/plus/" folder. ## Version Version 1.0.4, April 27, 2020
Owner
- Name: Andrew Q. Philips
- Login: andyphilips
- Kind: user
- Location: Boulder, Colorado, USA
- Company: University of Colorado Boulder, Department of Political Science
- Website: http://www.andyphilips.com/
- Twitter: andyphilips_
- Repositories: 3
- Profile: https://github.com/andyphilips
Associate Professor of Political Science, CU Boulder
GitHub Events
Total
Last Year
Committers
Last synced: 7 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| Andrew Q. Philips | a****s@c****u | 14 |
| Andrew Q. Philips | a****t@g****m | 1 |
Committer Domains (Top 20 + Academic)
colorado.edu: 1
Issues and Pull Requests
Last synced: 7 months ago