SPost9: Postestimation Analysis with Stata - Scott Long & Jeremy Freese
Long & Freese - Regression Models for Categorical Dependent Variables Using Stata
Long - Regression Models for Categorical and Limited Dependent Variables :: Statalist :: StataCorp
Home Teaching Research SPost13 commands SPost9 commands Workflow of Data Analysis Contact and vita
SPost9
News Errata Installation Help FAQs Short courses Comments Disclaimer
Installing SPost

Overview

The most common cause of problems with SPost commands is that the latest version of Stata and/or SPost have not been installed. If you are having problems: 1) Update you copy of Stata; 2) Unintall SPost and then reinstall it.

Before installing SPost, be sure that you have the most recent update to Stata, including the latest ado files. If you do not have the latest updates, some SPost commands might not work. There are several packages that you can install for Stata 8, Stata 9 and Stata 10 (we can no longer support Stata 7). To install a package, enter the command findit <command-name>. Then follow the instructions you get on the screen. The packages are describe here, with installation information below.

ado files

For Stata 8, the spostado package contaist the SPost commands.

For Stata 9 and Stata 10, the spost9_ado package contains the SPost commands.

sample do files

spostrm7 contains do files that reproduce the results in Long's Regression Models for CLDVs.

spostst8 contains do files that reproduce the results in Long & Freese's Regression Models Categorical Outcomes Using Stata, Revised Edition. These files are for Stata 8.

spost9_do contains do files that reproduce the results in Long & Freese's Regression Models Categorical Outcomes Using Stata, 2nd Edition. These files are for Stata 9.

Ways to install programs

These packages can be installed in several ways which are described in detail below.

  1. Method 1: Installation using findit. This is the easiest method.
  2. Method 2: Installation using net. This method uses commands submitted in the Command Window.
  3. Method 3: If you need to install SPost on a computer that is not connected to the internet, here is what you need to do.
  4. Method 4: Using SPost on a computer where you do not have write privileges (e.g., a lab where you cannot write to the computer's hard drive).

Method 1: Installation using findit

In Stata 8 or later, type:

    findit spost

Follow the prompts that you will be given. It should be that simple. Remember that you have to be connected to the internet.

Method 2: Installation using net

In Stata 8 or later while you are on-line, type:

    net from http://www.indiana.edu/~jslsoc/stata/

The available packages will be listed with the package names shown in blue. Click on the blue name of the package you want to install and follow the instructions. Or, you can enter commands:

    net install spost9_ado

To install the examples, you need to use net get. For example:

    net get spost9_do

If you later want to remove the package, enter:

    ado uninstall spostado

If any of these packages already exist on your system and you want to replace them with the latest files, you need to add the replace option. For example:

  net install spost9_ado, replace
  net get spost9_do, replace

Method 3: Installation to a computer that does not have internet access

Step 1: Download the SPost files on a computer that does have access to the internet. On a computer that does have internet access, download SPost to a portable flash drive or portable hard drive. To do this, set your PERSONAL directory to a directory on your portable drive. For example, I might use f:\ado, then in Stata enter the two commands (including the : at the end and use capitals as noted):

  sysdir set PERSONAL f:\ado
  net set ado PERSONAL

Use Method 1 and 2 above to install the SPost files.

Step 2: Copy the files to the computer without access to the internet.

a) Plug your portable drive into the computer that does not have internet access.

b) Create a folder where you will place the SPost ado files. For example, create a folder c:\ado.

c) Copy the files from your portable drive to the new folder, say c:\ado.

d) Each time you run Stata you will need to set your PERSONAL directory to the folder where SPost is saved. For example:

  sysdir set PERSONAL c:\ado

This command could be placed in your profile.do file. See the Stata installation instructions for details.

Method 4: Using SPost on a computer where you do not have write privileges

This often occurs if you are running Stata over a network. You have two options. You can ask your network administrator to install SPost (and keep it up-to-date). Or you can install SPost to a directory where you can write. To do this:

a) Create a folder on a drive where you can write. For example, I will create the folder m:\ado on my portable hard drive that the computer recognizes as the m: drive.

b) Set your PERSONAL directory to access this folder. For example:

  sysdir set PERSONAL m:\ado
  net set ado PERSONAL

c) Install SPost using any of the methods above.

c) Each time you run Stata you will need to set your PERSONAL directory to access this folder. For example:

  sysdir set PERSONAL m:\ado

Updating Stata

To determine if you need to update your copy of Stata:

1. Log onto the internet.

2. Launch Stata and enter the command: update query . Stata which use the internet to check if you need to update your files. Follow the prompts that you will be given.

If you are running Stata over a network and do not have write privileges to the appropriate directory, you need to contact your network administrator.


© 2014 J. Scott Long    
SPost9 - Postestimation commands for Stata 9 and later.