This paper applies the inverse probability weighted (IPW) least-squares method to estimate the effects of treatment on total medical cost, subject to censoring, in a panel-data setting. IPW pooled ordinary-least squares (POLS) and IPW random effects (RE) models are used. Because total medical cost might not be independent of survival time under administrative censoring, unweighted POLS and RE cannot be used with censored data, to assess the effects of certain explanatory variables. Even under the violation of this independency, IPW estimation gives consistent asymptotic normal coefficients with easily computable standard errors. A traditional and robust form of the Hausman test can be used to compare weighted and unweighted least squares estimators. The methods are applied to a sample of 201 Medicare beneficiaries diagnosed with lung cancer between 1994 and 1997.