APPLY Subcommand (WLS command)

  • The APPLY subcommand allows you to use a previously defined WLS model without having to repeat the specifications.
  • The only specification on APPLY is the name of a previous model in quotes. If a model name is not specified, the model specified on the previous WLS command is used.
  • To change one or more model specifications, specify the subcommands of only those portions you want to change after the APPLY subcommand.
  • If no variables are specified on the command, the variables that were originally specified with the model being reapplied are used.

Example

WLS VARIABLES = X1 WITH Y1
  /SOURCE=Y1
  /DELTA=1.5.
WLS APPLY
  /DELTA=2.
  • The first command produces a weighted least-squares regression of X1, with Y1 as the source variable and delta equal to 1.5.
  • The second command uses the same variable and source but changes the delta value to 2.

Example

WLS VARIABLES = X1 WITH Y1 Z1
  /SOURCE=Z1
  /DELTA=1 TO 3 BY 0.5
WLS APPLY
  /WEIGHT=WGT#1.
  • The first command regresses X1 on Y1 and Z1, using Z1 as the source variable. The delta values range from 1 to 3, incrementing by 0.5.
  • The second command again regresses X1 on Y1 and Z1, but this time applies the values of WGT#1 as the weights.