Date: Mon, 11 Jan 1999 08:34:01 +0200
Reply-To: hillel vardi <hilel@BGUMAIL.BGU.AC>
Sender: "SPSSX(r) Discussion" <SPSSX-L@UGA.CC.UGA.EDU>
From: hillel vardi <hilel@BGUMAIL.BGU.AC>
Subject: Re: Basic Descriptive Statistics Problem
Content-Type: text/plain; charset=us-ascii
shalom
- check the first,last and leave command .
here is a genral scrip to do the transformation
*one can use data list here instaed of get
get file=myfile.sva
sort cases ....
compute tmp=1
*this is to create the start var
do if tmp lt 0
xsave outfile=tmp.sv
end if
add files file=* /file=tmp.sv
/first=startt / last=endd/ by id
execute
numeric ii(f2)
leave ii
do if startt eq 1
compute ii=1
*set the ii value
end if
do if ii le 4
compute keepcase=1
end if
compute ii=ii+1
execute
select if keepcase eq 1
Hillel Vardi Ben-Gurion U Israel
>>> Hebrew is a deficult language English to <<<
James Mauldin wrote:
> Hi,
>
> Very basic problem as follows:
>
> Assume a database with salary information for:
> 10,000 employees 1000 companies 100 job categories
>
> For job category X, let's say I need the mean salary and number of valid
> cases for all companies. No problem. But I also need to know the
> number of companies that have at least one person in job category X.
>
> How to do this, and is there a way to combine the output into a single
> table using SPSS Base only?
>
> Thanks,
>
> Jim Mauldin
|