Chapter Contents

Previous

Next
The CORR Procedure

WEIGHT Statement


Specifies weights for the analysis variables in the calculation of Pearson weighted product-moment correlation.

Restriction: Not valid with the HOEFFDING, KENDALL, or SPEARMAN option.
See also: For information on calculating weighted correlations, see Pearson Product-Moment Correlation .


WEIGHT variable;


Required Arguments

variable
specifies a numeric variable to use to compute weighted product-moment correlation coefficients. The variable does not have to be an integer. If the value of the weight variable is

Weight value... PROC CORR...
0 counts the observation in the total number of observations
less than 0 converts the value to zero and counts the observation in the total number of observations
missing excludes the observation

To exclude observations that contain negative and zero weights from the analysis, use EXCLNPWGT. Note that most SAS/STAT procedures, such as PROC GLM, exclude negative and zero weights by default.
Tip: When you use the WEIGHT statement, consider which value of the VARDEF= option is appropriate. See the discussion of the VARDEF= option for more information.

Note:   Prior to Version 8 of the SAS System, the procedure did not exclude the observations with missing weights from the count of observations.  [cautionend]


Chapter Contents

Previous

Next

Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.