Git Product home page Git Product logo

mht's Introduction

#Multiple Hypothesis Testing Stata code for the procedure detailed in List, Shaikh, and Xu (2015) link

##Stata 14 Users You can install mhtexp using Stata's ssc command.

ssc install mhtexp

Once the command finishes, you should be able to use the command. A data set, data.csv, and an example do file, mhtexp_examples.do are available in this repository for download if you want to run an example.

##Manual Stata Install Download or clone this repository and make sure your current directory contains

  • mhtexp.ado -- this initializes the stata comand "mhtexp" for usage from the command line or .do file
  • lmhtexp.mlib -- the required mata functions that perform the computation
  • mhtexp.sthlp -- OPTIONAL but recommended. Usage: from stata command line: help mhtexp

If it is your first time running the code, ensure that Stata knows to look in lmhtexp.mlib. From the Stata command line enter

mata: mata mlib index

See mhtexp_examples.do for usage example OR from stata terminal type help mhtexp

####Summary of contents

  • mhtexp_examples.do do file with examples using the included data set.
  • mhtexp.sthlp Stata14 help file
  • mhtexp.ado Contains the Stata command definition of mhtexp
  • data.csv contains the data set used in the List, Shaikh, and Xu (2015)
  • lmhtexp.mlib contains mata function required for the command; compiled using Stata14
  • stata11/lmhtexp11.mlib contains the mata functions required for the command; compiled using Stata11.

####For older versions of Stata (<Stata14 and =>Stata11) Stata versions that are atleast Stata11 can still use this command. However, the bootstrap option is currently unavailable for older versions of Stata. To use this command with an older version of Stata, first replace lmhtexp.mlib with lmhtexp11.mlib and remove or comment out line 2 in mhtexp.ado.

### Remove ###
version 14

The key difference in these two files (outside of how they are compiled), is the way in which ids are selected for the bootstrap sample.

In both cases the same random number generater is used to select random variates over [a, b]. While Stata14 has a built in method, Stata11 does not.

floor( (b-a+1) * runiform() + a)  // in lmhtexp11.mlib (Stata11)
runiformint(r, c, a, b) // in lmhtexp.mlib (Stata14)

The two methods both produce the desired result, but the matrix of IDs is slightly different accross these two methods. Therefore, the bootstrapped statistics used to generate the outputted p-values will not be identical to the results presented in List, Shaikh, Xu 2015.

contact: [email protected]

mht's People

Contributors

seidelj avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.