Example: barber

Syntax - Stata

Obtain predictions, residuals, etc., after estimation programming commandSyntaxDescriptionOptionsMethods and formulasReferenceAlso seeSyntaxAfter regresspredict[type]newvar[if] [in] [, xb stdp stdf stdr hat cooksdresiduals rstandard rstudent nolabel]After single-equation (SE) estimatorspredict[type]newvar[if] [in] [, xb stdp nooffset nolabel]After multiple-equation (ME) estimatorspredict[type]newvar[if] [in] [, xb stdp stddp nooffset nolabelequation(eqno[,eqno])]Description predictis for use by programmers as a subroutine for implementing thepredictcommandfor use after estimation; see [R] the linear prediction from the fitted model. That is, all models can be thought of asestimating a set of parametersb1,b2,..,bk, and the linear prediction is yj=b1x1j+b2x2j+ +bkxkj, often written in matrix notation as yj=xjb.

Reference Cook, R. D. 1977. Detection of influential observation in linear regression. Technometrics 19: 15–18. Also see [R] predict — Obtain predictions, residuals, etc., after estimation [U] 20 Estimation and postestimation commands

Tags:

  Reference, Syntax

Information

Domain:

Source:

Link to this page:

Please notify us if you found a problem with this document:

Other abuse

Advertisement

Transcription of Syntax - Stata

1 Obtain predictions, residuals, etc., after estimation programming commandSyntaxDescriptionOptionsMethods and formulasReferenceAlso seeSyntaxAfter regresspredict[type]newvar[if] [in] [, xb stdp stdf stdr hat cooksdresiduals rstandard rstudent nolabel]After single-equation (SE) estimatorspredict[type]newvar[if] [in] [, xb stdp nooffset nolabel]After multiple-equation (ME) estimatorspredict[type]newvar[if] [in] [, xb stdp stddp nooffset nolabelequation(eqno[,eqno])]Description predictis for use by programmers as a subroutine for implementing thepredictcommandfor use after estimation; see [R] the linear prediction from the fitted model. That is, all models can be thought of asestimating a set of parametersb1,b2,..,bk, and the linear prediction is yj=b1x1j+b2x2j+ +bkxkj, often written in matrix notation as yj=xjb.

2 For linear regression, the values yjare called the predicted values, or for out-of-sample predictions, the forecast. For logit and probit,for example, yjis called the logit or probit is important to understand that thex1j,x2j,..,xkjused in the calculation are obtainedfrom the data currently in memory and do not have to correspond to the data on the independentvariables used in fitting the model (obtaining theb1,b2,..,bk).stdpcalculates the standard error of the prediction after any estimation command. Here the predictionis understood to mean the same thing as the index , namely,xjb. The statistic produced bystdpcan be thought of as the standard error of the predicted expected value, or mean index, forthe observation s covariate pattern. This is also commonly referred to as the standard error of thefitted the standard error of the forecast, which is the standard error of the point predictionfor 1 observation.

3 It is commonly referred to as the standard error of the future or forecast construction, the standard errors produced bystdfare always larger than those produced bystdp; seeMethods and formulasin [R] Obtain predictions, residuals, etc., after estimation programming commandstdrcalculates the standard error of the (orleverage) calculates the diagonal elements of the projection hat the Cook sDinfluence statistic (Cook 1977).residualscalculates the the standardized the Studentized (jackknifed) be combined with most statistics and specifies that the calculation be made, ignoringany offset or exposure variable specified when the model was option is available, even if not documented, forpredictafter a specific command. If neithertheoffset(varname)option nor theexposure(varname)option was specified when the modelwas fit, specifyingnooffsetdoes labeling the newly created allowed only after you have previously fit a multiple-equation model.

4 The standard error ofthe difference in linear predictions (x1jb x2jb)between equations 1 and 2 is calculated. Usetheequation()option to get the standard error of the difference between other (eqno[,eqno])is relevant only when you have previously fit a multiple-equation specifies the equation to which you are ()is typically filled in with oneeqno it would be filled in that way with optionsxbandstdp, for (#1)would mean that the calculation is to be made for thefirst equation,equation(#2)would mean the second, and so on. You could also refer to theequations by their names:equation(income)would refer to the equation namedincomeandequation(hours)to the equation you do not specifyequation(), the results are the same as if you specifiedequation(#1).

5 Other statistics refer to between-equation concepts;stddpis an example. You might then spec-ifyequation(#1,#2)orequation(income ,hours). When two equations must be specified,equation()is and formulasSeeMethods and formulasin [R]predictand [R] , R. D. 1977. Detection of influential observation in linear : 15 see[R]predict Obtain predictions, residuals, etc., after estimation[U] 20 Estimation and postestimation commands


Related search queries