{"id":627,"date":"2013-05-10T10:18:01","date_gmt":"2013-05-10T10:18:01","guid":{"rendered":"http:\/\/ri.itservices.manchester.ac.uk\/csf-apps\/?page_id=627"},"modified":"2016-12-07T12:26:09","modified_gmt":"2016-12-07T12:26:09","slug":"stata","status":"publish","type":"page","link":"https:\/\/ri.itservices.manchester.ac.uk\/csf-apps\/software\/applications\/stata\/","title":{"rendered":"Stata"},"content":{"rendered":"<h2>Overview<\/h2>\n<p>Stata is a general-purpose statistical software package. Version 12 is installed on the CSF.  Stata may be used in batch mode and interactively, via the GUI, on the CSF.  Use of Stata via batch mode is <i>strongly<\/i> preferred.<\/p>\n<h2>Restrictions on Use<\/h2>\n<p>Only those users who are either in Professor Jane Worthington\u2019s group or the Faculty of Humanities and AMBS may use this software (further details below). Access to the software is restricted by Unix groups. <\/p>\n<p>All users must abide by the <a href=\"http:\/\/www.stata.com\/order\/end-user-license-agreement\/S14EULA.pdf\">license agreement<\/a>. Important points to note are:<\/p>\n<ul>\n<li>Only staff and students of The University of Manchester are permitted to use the software.<\/li>\n<li>Usage only for academic work is permitted. Usage for commercial work including commercially funded grants is not permitted<\/li>\n<\/ul>\n<p>Please contact <a href=\"&#x6d;&#x61;&#x69;&#x6c;&#116;&#111;:it&#x73;&#x2d;&#x72;&#x69;&#45;&#116;eam&#x40;&#x6d;&#x61;&#x6e;&#99;&#104;&#101;st&#x65;&#x72;&#x2e;&#x61;&#99;&#46;&#117;k\">&#x69;&#x74;&#x73;&#x2d;&#x72;&#x69;&#x2d;&#x74;&#x65;&#x61;&#x6d;&#x40;&#x6d;&#x61;&#x6e;&#x63;&#x68;&#x65;&#x73;&#x74;&#x65;&#x72;&#x2e;&#x61;&#x63;&#x2e;&#x75;&#x6b;<\/a> to request access.<\/p>\n<h2>Set up procedure<\/h2>\n<p>Load one of the following modulefiles below according to which group you are in:<\/p>\n<ul>\n<li>Prof. Jane Worthington&#8217;s group\n<pre>\r\n# Latest version (version 13.1 Update 2015-Dec-03)\r\nmodule load apps\/binapps\/stata\/13-jw01\r\n\r\n# Older versions (version 13.0 base 2013-Jul-02)\r\nmodule load apps\/binapps\/stata\/13-jw01-130702\r\n\r\n# Version 12\r\nmodule load apps\/binapps\/stata\/12\r\n<\/pre>\n<\/li>\n<li>Humanities and AMBS\n<pre>\r\n# Version 14\r\nmodule load apps\/binapps\/stata\/14-160201 <-- apps\/binapps\/stata\/14 loads this version\r\nmodule load apps\/binapps\/stata\/14-151007 \r\n<\/pre>\n<\/li>\n<\/ul>\n<h2>Running the application<\/h2>\n<p>There are several stata executables available on CSF:<\/p>\n<pre>\r\nstata               # IC version (standard, medium data)\r\nstata-sm            # SM verison (small data)\r\nstata-se            # SE version (single core, big data)\r\nstata-mp            # MP version (multicore, big data)\r\n<\/pre>\n<p>Full information on the differences between these versions (e.g., number of variables they can process, size of data) is available at <a href=\"http:\/\/www.stata.com\/manuals13\/u5.pdf\">http:\/\/www.stata.com\/manuals13\/u5.pdf<\/a>.<\/p>\n<p>You should also consult the stata manual for guidance on managing memory: <a href=\"http:\/\/www.stata.com\/manuals13\/u6.pdf\">http:\/\/www.stata.com\/manuals13\/u6.pdf<\/a>.<\/p>\n<p>Please do not run stata on the login node.<\/p>\n<h3>Example &mdash; serial batch job:<\/h3>\n<p>Suppose that you have a Stata <code>.do<\/code> file, which you wish to run in batch mode, called <code>my_file.do<\/code>.  Then write a job submissions script with the following content:<\/p>\n<pre>\r\n#!\/bin\/bash\r\n#$ -S \/bin\/bash\r\n#$ -cwd\r\n#$ -V\r\n\r\nstata -b do my_file.do\r\n<\/pre>\n<p>Assuming that the submission script is called <code>my_stata.qsub<\/code>, then to submit the job <\/p>\n<pre>\r\nqsub my_stata.qsub\r\n<\/pre>\n<p>To run the SM or SE version simply change the exectuable in the above script.<\/p>\n<h3>Example &mdash; parallel batch job:<\/h3>\n<p>Suppose that you have a Stata <code>.do<\/code> file, which you wish to run in batch mode on 8 cores, called <code>my_file.do<\/code>.  Then write a job submissions script with the following content:<\/p>\n<pre>\r\n#!\/bin\/bash\r\n#$ -S \/bin\/bash\r\n#$ -cwd\r\n#$ -V\r\n#$ -pe smp.pe 8\r\n\r\nstata-mp -b do my_file.do\r\n<\/pre>\n<p>Assuming that the submission script is called <code>my_stata.qsub<\/code>, then to submit the job <\/p>\n<pre>\r\nqsub my_stata.qsub\r\n<\/pre>\n<h2>Installing Modules with ssc<\/h2>\n<p>Additional stata packages\/modules can be installed using the <code>ssc<\/code> command in stata. You'll need to configure stata to use the University proxy as follows:<\/p>\n<ol>\n<li>Start the graphical version of stata using:\n<pre>xstata<\/pre>\n<p>This can be done on the login node but only for downloading and installing packages - you must not use stata on the login node once the package has installed.<\/li>\n<li>Select the menus: <em>Edit-&gt;Preferences-&gt;General Preferences<\/em><\/li>\n<li>Select <em>Internet<\/em> in the list on the left hand side<\/li>\n<li>Tick <em>Connect through a proxy server<\/em> and make the following settings:<\/li>\n<li>HTTP Server: <code>webproxy.its.manchester.ac.uk<\/code><\/li>\n<li> Port: <code>3128<\/code><\/li>\n<\/ol>\n<p>You should then be able to run the <code>ssc install<\/code> command in the stata GUI. For example to install the <em>parmest<\/em> package:<\/p>\n<pre>\r\n. ssc install parmest\r\n<\/pre>\n<p>Stata should report it is downloading the file and installing.<\/p>\n<h2>Further information<\/h2>\n<p>There are many excellent Web-based resources which offer help on Stata.  Many of these are mentioned at the Stata Web site on their <a href=\"http:\/\/www.stata.com\/links\/resources-for-learning-stata\/\">Resources for learning Stata<\/A> page.<\/p>\n<h2>Updates<\/h2>\n<p>None since installation in May 2013.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Overview Stata is a general-purpose statistical software package. Version 12 is installed on the CSF. Stata may be used in batch mode and interactively, via the GUI, on the CSF. Use of Stata via batch mode is strongly preferred. Restrictions on Use Only those users who are either in Professor Jane Worthington\u2019s group or the Faculty of Humanities and AMBS may use this software (further details below). Access to the software is restricted by Unix.. <a href=\"https:\/\/ri.itservices.manchester.ac.uk\/csf-apps\/software\/applications\/stata\/\">Read more &raquo;<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"parent":31,"menu_order":0,"comment_status":"open","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-627","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/ri.itservices.manchester.ac.uk\/csf-apps\/wp-json\/wp\/v2\/pages\/627","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ri.itservices.manchester.ac.uk\/csf-apps\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/ri.itservices.manchester.ac.uk\/csf-apps\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/ri.itservices.manchester.ac.uk\/csf-apps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/ri.itservices.manchester.ac.uk\/csf-apps\/wp-json\/wp\/v2\/comments?post=627"}],"version-history":[{"count":20,"href":"https:\/\/ri.itservices.manchester.ac.uk\/csf-apps\/wp-json\/wp\/v2\/pages\/627\/revisions"}],"predecessor-version":[{"id":3493,"href":"https:\/\/ri.itservices.manchester.ac.uk\/csf-apps\/wp-json\/wp\/v2\/pages\/627\/revisions\/3493"}],"up":[{"embeddable":true,"href":"https:\/\/ri.itservices.manchester.ac.uk\/csf-apps\/wp-json\/wp\/v2\/pages\/31"}],"wp:attachment":[{"href":"https:\/\/ri.itservices.manchester.ac.uk\/csf-apps\/wp-json\/wp\/v2\/media?parent=627"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}