| Date: | Sat, 27 Jul 1996 08:06:01 -0700 |
| Reply-To: | Bruce Phillips <bphillip@RCF.USC.EDU> |
| Sender: | "SPSSX(r) Discussion" <SPSSX-L@UGA.CC.UGA.EDU> |
| From: | Bruce Phillips <bphillip@RCF.USC.EDU> |
| Subject: | Re: write command |
|
| In-Reply-To: | <199607230838.BAA20972@alnitak.usc.edu> |
|---|
I have done something similar with a comma instead of a space.I believe I
just said
COMPUTE COMMA=','.
As a variation of this technique, I have sometimes had to examine
indivdiual so I could classify them on some other variable for which there
was missing data. In this situation I do a list cases:
COMPUTE TEXTSUB='XXX'.
PROCESS IF (data missing on variable Q and Variable X= some other value).
LIST /CASES=n /VARIABLES=ID4CASE VAR1 VAR2 VAR3
The printout would look like this:
TEXTSUB ID4CASE VAR1 VAR2 VAR3
xxx 735 1 2 3
xxx 463 2 1
I then examine the patterns and can decide If and how I want to
re-classify the variable. Using the REVEW text editor and the Function5
search and replace command, I can change the xxx to IF ID4CASE= and then
re-classify the cases by HHID numbers. I found this paritcularly helpful
when working with hierarchical data such as children in the household
which have been made into an individual level file of children.
On Tue, 23 Jul 1996, Ducati 750 Super Sport wrote:
> On Mon, 22 Jul 1996 19:42:00 GMT Lynn Nicole Lethbridge wrote:
>
> > From: Lynn Nicole Lethbridge <lynnl@IS.DAL.CA>
> > Date: Mon, 22 Jul 1996 19:42:00 GMT
> > Subject: write command
> > To: Multiple recipients of list SPSSX-L <>
> >
> > Hi there
> >
> > I was wondering if anyone out there knows if the "write" command can be
> > used in SPSS to write all of the variables in a file into columns with a
> > space between each.
> [snip]
> >
> > I tried the "write file / all" command but it seems to randomly put
> > spaces in a few places while most of the time there is no space in
> > between.
> >
>
> As Hector Maletta noticed in his mail from Mon, 22 Jul 1996 21:53:03 the
> syntax for the write command is
>
> write outfile = fileaname
> /all .
>
> execute.
>
> You don't find spaces between some variables because the values of
> neigbhoring variables fit exactly the standard format, e.g. numeric
> variables are most of time f8.2. If two values of neighboring
> variables are, for example, var_1 10.000.000 and var_2 20.000.000 and the
> variable format if F8.2 you won't find any spaces between the variables in
> the output file. You could either change the variable format (format var_1
> (F9.2) /var_2 (F9.2), the write format (write formats var_1 (F9.2) /var_2
> (F9.2), specify the variable format of the write command or use a literal
> space:
>
> write outfile = prsnl /tenure (F2.0) ' ' mohired yhired dept *
> salary85 to salary88 (4(Dollar8,1x)) name.
>
> Format F2.0 is specified for the variable TENURE. A blank between
> apostrophes is specified as a string after TENURE to spearate values of
> TENURE from those of MOHIRED. MOHIRED, YHIRED, and DEPT are written with
> default formats because the asterik prevents them from receiving the
> DOLLAR8 format specified for SALARY85 to SALARY88. The element 1X is
> specified with DOLLAR8 to add one blank after each value of SALARY85 to
> SALARY88.
>
> Example taken from the SPSS reference guide, page 722-725.
>
> Jens Boelte
> -------------------------------
> Psychologisches Institut II
> Fliedner Str. 21
> 48149 Muenster
> Germany
>
|