Example (WLS command)

WLS cost  WITH sqft inorout yrexp
  /SOURCE sqft
  /POWER 0 TO 5 BY 0.5
  /CONSTANT
  /SAVE WEIGHT
  /PRINT BEST.
  • This command specifies a weighted least-squares regression in which cost is the dependent variable and sqft, inorout, and yrexp are the independent variables.
  • The SOURCE subcommand identifies sqft as the source of heteroscedasticity.
  • The POWER subcommand specifies that several equations will be fit, one for each value from 0 to 5, incrementing by 0.5. Weights will be calculated using sqft.
  • The SAVE subcommand requests that the weights that maximize the log-likelihood function be saved to the active dataset.
  • All other options are set to their default values.