TAXSIM is a network service available via plain ftp. Notice that it is a service, and not a program that is provided. You upload the data, and download the results. This is also the underlying interface used by the Taxsim on the web, or from Stata. A scriptable ftp client is found on all Windows and Unix/Linux systems.
You should ftp to make sure it is installed, and not blocked at your firewall. If it is blocked, you can use the TAXSIM http interface.
You will need a file in the same format described at for uploading on the Taxsim web page. You can log onto taxsimftp.nber.org with the username 'taxsim' and password '02138'. Then you upload your file to directory /tmp under any arbitrary name. Once the file is completely uploaded, you can download the calculated results by tacking .taxsim onto the name used in the upload. The calculation actually occurs during the download on our server. Old input files are deleted once a day.
That's it. You don't really need any more information. Aside from filewalls, you only need to create and upload the file described on the Taxsim web page. But please follow the instructions there carefully. If there are errors in the file, such as non-decimal characters or missing value codes, then the downloading will stop, and the last few lines of that .taxsim file will contain the error message.
If the default marginal tax rate calculation or level of detail is not to your liking, it is possible to change either with variables mtr and idtl.
The choices for the marginal tax calculation are:
The choices for detail are:
An example:
taxsimid year mstat page sage depx dep13 dep17 dep18 ltcg mtr itdl 1 1970 2 55 52 0 0 0 0 100000 70 0 2 1970 2 55 52 2 2 2 2 100000 70 0The second record describes a 1970 joint return with no dependents and 100000 in long term capital gains income. The third record adds 2 young children. Both records request standard level of detail and marginal rate with respect to long term gains.
Because SAS has a built-in ftp client, you can "call" taxsim from within a SAS program. There is a SAS taxsim macro. But here is a educational demonstration of the low level call, not using the macro:
/* Using the SAS FTP function with Taxsim 1) Need to create a unique filename - &DATAFILE is taken from the time of day 2) Convert any missing values into zeros for taxsim 3) upload the values as ASCII 4) using the .taxsim file extension on the filename, fetch the results 5) fetch the .msg file and print that to the sas log. Important References: http://www.nber.org/taxsim/taxsim30/ http://www.nber.org/taxsim/taxsim30/macro.sas http://www.nber.org/taxsim/taxsim30/example.sas http://support.sas.com/documentation/cdl/en/lrdict/61724/HTML/default/a000178980.htm http://support.sas.com/documentation/cdl/en/lrdict/61724/HTML/default/a001281561.htm BUGS: Before reporting communication problems, please uncomment the "debug" option on the filename statements, rerun, and send the log file to me. Daniel Feenberg feenberg@nber.org 617-588-0343 */ /* Demonstrate SAS Taxsim with a one record dataset. */ data; input taxsimid year mstat page sage depx dep13 dep17 dep18 ltcg; cards; 1 1970 2 55 52 0 0 0 0 100000 2 1970 2 55 52 2 2 2 2 100000; run; %let DATAFILE = %SUBSTR(&SYSTIME,1,2)%SUBSTR(&SYSTIME,4,2); %PUT 'Filename on taxsimftp server is:' &DATAFILE; filename txpydata ftp "&DATAFILE" host='taxsimftp.nber.org' user='taxsim' pass='02138' cd='tmp' /*debug*/; filename results ftp "&DATAFILE..taxsim30" host='taxsimftp.nber.org' user='taxsim' pass='02138' cd='tmp' /*debug*/ lrecl=1024; filename errors ftp "&DATAFILE..msg" host='taxsimftp.nber.org' user='taxsim' pass='02138' cd='tmp' /*debug*/; proc export outfile=txpydata dbms=csv run; proc import infile=results dbms=csv run;
Daniel Feenberg
feenberg at nber dotte org