horace_vr
horace_vr

Reputation: 3166

SPSS - add factor loadings from output as data variables

Is it possible to add the factor loadings from an SPSS output table as data variables in SPSS ? The new variables would actually be constants, but I need them (dynamically) in calculations.

Python is an option, but I am quite a noob with that...

Upvotes: 2

Views: 113

Answers (1)

Jignesh Sutar
Jignesh Sutar

Reputation: 2929

You can use Output Management System (OMS) to capture any output that is generated from SPSS into a dataset, from which you can then do any maniulations/calcualtions as you wish.

Below is such an example:

get file="C:\Program Files\IBM\SPSS\Statistics\23\Samples\English\Employee data.sav".
dataset name dsRaw.

DATASET DECLARE  dsFact.
OMS
  /SELECT TABLES
  /IF COMMANDS=['Factor Analysis'] SUBTYPES=['Factor Matrix']
  /DESTINATION FORMAT=SAV NUMBERED=TableNumber_
   OUTFILE='dsFact' VIEWER=YES
  /TAG='dsFact'.

FACTOR
  VARIABLES salary salbegin jobtime prevexp
  /MISSING LISTWISE 
  /ANALYSIS salary salbegin jobtime prevexp
  /PRINT INITIAL EXTRACTION
  /PLOT ROTATION
  /CRITERIA MINEIGEN(1) ITERATE(25)
  /EXTRACTION PC
  /ROTATION NOROTATE
  /METHOD=CORRELATION.

OMSEND tag=['dsFact'].

Upvotes: 2

Related Questions