% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/taxsim9v2.R
\name{taxsim9}
\alias{taxsim9}
\title{NBER Tax Simulator v. 9.0}
\usage{
taxsim9(datafr, mtr = 11, detail = 0, optiontax1 = 0,
  optiontaxvalue = 0)
}
\arguments{
\item{datafr}{A vector, dataframe or matrix which is composed of either headers and data or just data and stores information for each individual on relevant financial and family information for tax code. Values not entered are assumed to be 0. Possible data fields (not including headers, which should be specified as variable names below) for individuals include:
\describe{\item{taxsimid:}{Case ID}\item{year:}{Tax year between 1960 and 2012}\item{state:}{State, 0 or 1 to 51 in alphabetical order}\item{mstat:}{Marital Status, \describe{\item{1:}{Unmarried}\item{2:}{Married}\item{3:}{Head of household (single with dependent)}\item{8:}{Taxpaying dependent}}} \item{depx:}{Dependent exemptions}\item{agex:}{Age of primary taxpayer times 100 plus age of second taxpayer if relevant}\item{pwages:}{Wage income of Primary Taxpayer}\item{swages:}{Wage income of spouse}
\item{dividends:}{Dividend income}\item{otherprop:}{Other property income}\item{pensions:}{Taxable Pensions}\item{gssi:}{Gross Social Security Benefits}\item{transfers:}{Non-taxable transfer income}\item{rentpaid:}{Rent paid on property}\item{proptax:}{Real estate tax paid}\item{otheritem:}{Other itemized deductions}\item{childcare:}{Childcare expenses}\item{ui:}{Unemployment Compensation}\item{depchild:}{Number of dependents under age 17}\item{mortgage:}{Other mortgage deductions}\item{ltcg:}{Long-term Capital Gain or Loss}\item{stcg:}{Short-term Capital Gain or Loss}}}

\item{mtr}{Marginal tax rate calculation. Options available are \describe{\item{11}{Wages} \item{70}{Long-Term Capital Gains} \item{85}{Primary Wage Earner} \item{86}{Secondary wage earner}}}

\item{detail}{Detail determines level of detail that the output will return. Options are: \describe{\item{0}{Standard} \item{2}{Full variables} \item{8}{Full with text description}}}

\item{optiontax1}{Together with optiontaxvalue jointly specify the tax plan chosen. The option number is represented by optiontax1. For example, chosing 50, 1 will suppress AMT.}

\item{optiontaxvalue}{Together with optiontax1 jointly specify the tax plan chosen.  The parameter is represented by optiontaxvalue. For example, chosing 50, 1 will suppress AMT.}
}
\value{
Returns a dataframe containing the following results (with column names taking on acronyms listed): \describe{\item{taxsimid}{Case ID}\item{year}{Year}\item{state}{State}\item{fiitax}{Federal income tax liability... including capital gains rates surtaxes, AMT, and refundable/nonrefundable taxcredits}\item{fica}{FICA}\item{frate}{Federal Marginal Rate}\item{srate}{State Marginal Rate}\item{ficar}{Fica Rate}}
If detailed results are requested the following results are also added:\describe{\item{fagi}{Federal AGI}\item{uiagi}{UI in AGI}\item{ssagi}{Social Security in AGI}\item{zba}{Zero Bracket Amount}\item{persex}{Personal Exemptions}\item{exphase}{Exemption Phaseout}\item{dphase}{Deduction Phaseout}\item{dallow}{Deductions Allowed}\item{fti}{Federal Taxable Income}
\item{taxti}{Tax on Taxable Income}\item{exsur}{Exemption Surtax}\item{gencred}{General Tax Credit}\item{ctcred}{Child Tax Credit}\item{accred}{Additional Child Tax Credit}\item{cccred}{Child Care Credit}\item{eic}{Earned Income Credit}\item{iamt}{Income for Alternative Minimum Tax}\item{amtliab}{AMT Liability after credit for regular tax}\item{fitcred}{Federal Income Tax Before Credits}\item{fica}{FICA}}
Finally, if a state is specified, we also return the following state-specific results:\describe{\item{shi}{State Household Income}\item{srp}{State Rent Payments}\item{sagi}{State AGI}\item{sea}{State Exemption Amount}\item{ssd}{State Standard Deduction}\item{sid}{State Itemized Deductions}\item{sti}{State Taxable Income}\item{sptc}{State Property Tax Credit}\item{sccc}{State Child Care Credit}\item{seic}{State EIC}\item{stc}{State Total Credits}\item{sbr}{State Bracket Rate}}
}
\description{
A NBER Package for calculating US and State Tax Returns.
}
\examples{
taxsim9(c("year","mstat", "ltcg",1970,2,100000))
taxsim9(datafr=matrix(c("year","mstat", "ltcg",1970,2,100000),ncol=3,byrow=TRUE))
taxsim9(c(25,1970,0,1,0,0,100000,rep(0,15)))
taxsim9(datafr=c("mstat","ltcg","year",2,100000,1970),detail=2)
}
\seealso{
\url{http://users.nber.org/~taxsim/}
}
\author{
Daniel Feenberg and Brandon Kaplowitz
}
