Stata 11 help for vwls

help vwls dialog: vwls also see: vwls postestimation ------------------------------------------------------------------------------- Title

[R] vwls -- Variance-weighted least squares

Syntax

vwls depvar indepvars [if] [in] [weight] [, options]

options description ------------------------------------------------------------------------- Model noconstant suppress constant term sd(varname) variable containing estimate of conditional standard deviation

Reporting level(#) set confidence level; default is level(95) display_options control spacing and display of omitted variables and base and empty cells

+ coeflegend display coefficients' legend instead of coefficient table ------------------------------------------------------------------------- + coeflegend does not appear in the dialog box. indepvars may contain factor variables; see fvvarlist. bootstrap, by, jackknife, rolling, and statsby are allowed; see prefix. Weights are not allowed with the bootstrap prefix. fweights are allowed; see weight. See [R] vwls postestimation for features available after estimation.

Menu

Statistics > Linear models and related > Other > Variance-weighted least squares

Description

vwls estimates a linear regression using variance-weighted least squares. It differs from ordinary least-squares (OLS) regression in that it does not assume homogeneity of variance, but requires that the conditional variance of depvar be estimated prior to the regression. The estimated variance need not be constant across observations. vwls treats the estimated variance as if it were the true variance when it computes standard errors of the coefficients.

You must supply an estimate of the conditional standard deviation of depvar to vwls by using the sd(varname) option, or you must have grouped data with groups defined by the indepvars variables. In the latter case, vwls treats all indepvars as categorical variables, computes the mean and standard deviation of depvar separately for each subgroup, and computes the regression of the subgroup means on indepvars.

Options

+-------+ ----+ Model +------------------------------------------------------------

noconstant; see [R] estimation options.

sd(varname) specifies an estimate of the conditional standard deviation of depvar (that is, it can vary observation by observation). All values of varname must be > 0. If you specify sd(), you cannot use fweights.

If sd() is not given, the data will be grouped by indepvars. Here indepvars are treated as categorical variables, and the means and standard deviations of depvars for each subgroup are calculated and used for the regression. Any subgroup for which the standard deviation is zero is dropped.

+-----------+ ----+ Reporting +--------------------------------------------------------

level(#); see [R] estimation options.

display_options: noomitted, vsquish, noemptycells, baselevels, allbaselevels; see [R] estimation options.

The following option is available with vwls but is not shown in the dialog box:

coeflegend; see [R] estimation options.

Example

. webuse bp . vwls bp gender race

Saved results

vwls saves the following in e():

Scalars e(N) number of observations e(df_m) model degrees of freedom e(chi2) model chi-squared e(df_gf) goodness-of-fit degrees of freedom e(chi2_gf) goodness-of-fit chi-squared e(rank) rank of e(V)

Macros e(cmd) vwls e(cmdline) command as typed e(depvar) name of dependent variable e(properties) b V e(predict) program used to implement predict e(asbalanced) factor variables fvset as asbalanced e(asobserved) factor variables fvset as asobserved

Matrices e(b) coefficient vector e(V) variance-covariance matrix of the estimators

Functions e(sample) marks estimation sample

Also see

Manual: [R] vwls

Help: [R] vwls postestimation; [R] regress


© Copyright 1996–2009 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index