Re: do repeat

Posted by David Marso on
URL: http://spssx-discussion.165.s1.nabble.com/do-repeat-tp5719707p5719714.html

Edited:  Changes in BOLD.
If the numbers are all non zero then you can nuke the very small fudge factor and remove the recode.
If you have negative values *AND* 0's) then you will need to modify the recode (I'm sure you can sort that).
The FORMAT and VARIABLE WIDTH are simply for visual confirmation.

DATA LIST / X1 TO X40 1-40.
BEGIN DATA
1616313136163163163615616316731673516351
7363137130003115235553123153163131310130
END DATA.

MATRIX.
GET X / VARIABLES X1 TO X40.
SAVE (1/(X+.00000000000000000000000001)) / OUTFILE *.
END MATRIX.

RECODE ALL (1.000001 THRU HI=SYSMIS).

FORMATS ALL (F20.16).
VARIABLE WIDTH ALL (20).

drfg2008 wrote
Thanks, I forgot the second vector command:

VECTOR bOdd1_WIN. = bOdd1_WIN.1 to bOdd1_WIN.48.

now it works.


Frank
Please reply to the list and not to my personal email.
Those desiring my consulting or training services please feel free to email me.
---
"Nolite dare sanctum canibus neque mittatis margaritas vestras ante porcos ne forte conculcent eas pedibus suis."
Cum es damnatorum possederunt porcos iens ut salire off sanguinum cliff in abyssum?"