f



Limiting a frequency function within a variable

Hi there,=20

I'm wondering if there is a way either through syntax or the GUI to search =
for selected cases within a variable. For example, I have a column labeled =
"Best", within which there a multiple values, some of which are "UNST1, UNS=
T2, UNST3 and NAD" among thousands of others.=20

I would like to execute a frequency count to just those values (excluding o=
thers)under the "Best" variable.

Any help would be greatly appreciated, thanks!=20
0
jace
10/19/2016 9:49:45 PM
comp.soft-sys.stat.spss 5679 articles. 0 followers. Post Follow

2 Replies
482 Views

Similar Articles

[PageSpeed] 28

On 19/10/2016 5:49 PM, jace.riley@gmail.com wrote:
> Hi there,
>
> I'm wondering if there is a way either through syntax or the GUI to search for selected cases within a variable. For example, I have a column labeled "Best", within which there a multiple values, some of which are "UNST1, UNST2, UNST3 and NAD" among thousands of others.
>
> I would like to execute a frequency count to just those values (excluding others)under the "Best" variable.
>
> Any help would be greatly appreciated, thanks!
>

Does this do what you want?

COMPUTE BestSubset = ANY(Best,"UNST1","UNST2","UNST3","NAD").
FORMATS BestSubset(F1).
VARIABLE LABELS BestSubset "Best value in the subset of interest?".
VALUE LABELS BestSubset
  0 "No"
  1 "Yes".
FREQUENCIES BestSubset.

-- 
Bruce Weaver
bweaver@lakeheadu.ca
http://sites.google.com/a/lakeheadu.ca/bweaver/Home
"When all else fails, RTFM."
0
Bruce
10/20/2016 12:07:17 AM
On Wednesday, October 19, 2016 at 5:07:09 PM UTC-7, Bruce Weaver wrote:
> On 19/10/2016 5:49 PM, jace.riley@gmail.com wrote:
> > Hi there,
> >
> > I'm wondering if there is a way either through syntax or the GUI to sea=
rch for selected cases within a variable. For example, I have a column labe=
led "Best", within which there a multiple values, some of which are "UNST1,=
 UNST2, UNST3 and NAD" among thousands of others.
> >
> > I would like to execute a frequency count to just those values (excludi=
ng others)under the "Best" variable.
> >
> > Any help would be greatly appreciated, thanks!
> >
>=20
> Does this do what you want?
>=20
> COMPUTE BestSubset =3D ANY(Best,"UNST1","UNST2","UNST3","NAD").
> FORMATS BestSubset(F1).
> VARIABLE LABELS BestSubset "Best value in the subset of interest?".
> VALUE LABELS BestSubset
>   0 "No"
>   1 "Yes".
> FREQUENCIES BestSubset.
>=20
> --=20
> Bruce Weaver
> bweaver@lakeheadu.ca
> http://sites.google.com/a/lakeheadu.ca/bweaver/Home
> "When all else fails, RTFM."

Thanks! Much appreciated Bruce!
0
jace
10/20/2016 4:52:46 PM
Reply: