Frequencies problems

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Frequencies problems

Juan Pablo Sandoval

HI:

I´m using SPSS V13, and i have to check a long list of variables var1, var2, var3, etc.

For each variable I do a freq commnad which results in something like this:

freq var1.

                 Frequency
10. USA     471
11. MEX     25
12. CAN     251
13. AUS     375
14. BRA     71
80              117
98. DK/DA     1

As you can see 80 does not belong in var1 since it has no assigned label, this is the kind of errors that i need to identify, but being a long list of variables (120 vars), each of different nature, I was looking for some way to identify in which cases does an incorrect code was entered more efficiently, this being defined by an unlabeled values.

Regards,

Reply | Threaded
Open this post in threaded view
|

Re: Frequencies problems

Spousta Jan
Juan Pablo,
Perhaps something like the following code would help:
 

* Create sample data.

INPUT PROGRAM.

LOOP #I = 1 TO 4.

COMPUTE V1 = #I.

COMPUTE V2 = #I.

COMPUTE V3 = #I.

END CASE.

END LOOP.

END FILE.

END INPUT PROGRAM.

VAL LAB V1 1 "one" 2 "two".

VAL LAB V2 1 "one" 3 "three" 4 "four".

VAL LAB V3 1 "one" 2 "two" 3 "three" 4 "four".

EXECUTE.

 

 

SAVE OUTFILE='C:\temp\aux_original.sav'

/COMPRESSED.

* Save as xls, with different names.

SAVE TRANSLATE OUTFILE='C:\temp\aux_xls.xls'

/TYPE=XLS /VERSION=8 /MAP /REPLACE /FIELDNAMES

/rename(V1 V2 V3 = X1 X2 X3)

/CELLS=LABELS .

DATASET NAME xls WINDOW=FRONT.

GET DATA /TYPE=XLS

/FILE='C:\temp\aux_xls.xls'

/SHEET=name 'aux_xls'

/CELLRANGE=full

/READNAMES=on

/ASSUMEDSTRWIDTH=32767.

* Merge both files.

MATCH FILES /FILE=*

/FILE='xls'.

EXECUTE.

* Compare variables.

DO REPEAT V = V1 V2 V3 / X = X1 X2 X3 .

- IF (MISSING(NUMBER(X, f8)) OR NUMBER(X, f8) NE V ) V = $SYSMIS.

END REPEAT.

* List unlabeled values.

FREQ V1 V2 V3 .

 

HTH

 

Jan



From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Juan Pablo Sandoval
Sent: Friday, July 24, 2009 12:43 AM
To: [hidden email]
Subject: Frequencies problems

HI:

I´m using SPSS V13, and i have to check a long list of variables var1, var2, var3, etc.

For each variable I do a freq commnad which results in something like this:

freq var1.

                 Frequency
10. USA     471
11. MEX     25
12. CAN     251
13. AUS     375
14. BRA     71
80              117
98. DK/DA     1

As you can see 80 does not belong in var1 since it has no assigned label, this is the kind of errors that i need to identify, but being a long list of variables (120 vars), each of different nature, I was looking for some way to identify in which cases does an incorrect code was entered more efficiently, this being defined by an unlabeled values.

Regards,

 

_____________

Tato zpráva a všechny připojené soubory jsou důvěrné a určené výlučně adresátovi(-ům). Jestliže nejste oprávněným adresátem, je zakázáno jakékoliv zveřejňování, zprostředkování nebo jiné použití těchto informací. Jestliže jste tento mail dostali neoprávněně, prosím, uvědomte odesilatele a smažte zprávu i přiložené soubory. Odesilatel nezodpovídá za jakékoliv chyby nebo opomenutí způsobené tímto přenosem.

P Jste si jisti, že opravdu potřebujete vytisknout tuto zprávu a/nebo její přílohy? Myslete na přírodu.

 


This message and any attached files are confidential and intended solely for the addressee(s). Any publication, transmission or other use of the information by a person or entity other than the intended addressee is prohibited. If you receive this in error please contact the sender and delete the message as well as all attached documents. The sender does not accept liability for any errors or omissions as a result of the transmission.

 

P Are you sure that you really need a print version of this message and/or its attachments? Think about nature.

-.- --
Reply | Threaded
Open this post in threaded view
|

Tamhane's T2 reference

Salbod

Dear Friends,

 

Good Morning (I’m in New York City).

 

I need a reputable reference for using the Tamhane's T2 test. I got the info from a website that recommended it b/c of

unequal cell sizes & homogeneity violations, but I don’t want use a website for the reference. Any recommendations?

 

Have a nice day,

 

Stephen Salbod, Pace University, NYC  

Reply | Threaded
Open this post in threaded view
|

Re: Frequencies problems

Ruben Geert van den Berg
In reply to this post by Juan Pablo Sandoval
Alternatively, you could use the SPSS syntax below, assuming that all your values are numeric and none of your labels are numeric (which I think is usually the case).
 
Kind regards,
 
Ruben van den Berg
Amsterdam, the Netherlands
 
*** Create sample data.
 
PRESERVE.
INPUT PROGRAM.
LOOP #I = 1 TO 4.
COMPUTE V1 = #I.
COMPUTE V2 = #I.
COMPUTE V3 = #I.
END CASE.
END LOOP.
END FILE.
END INPUT PROGRAM.
VAL LAB V1 1 "one" 2 "two".
VAL LAB V2 1 "one" 3 "three" 4 "four".
VAL LAB V3 1 "one" 2 "two" 3 "three" 4 "four".
EXECUTE.
DATAS NAM Data.
 
***End create data.
 
* OMS.
DATASET DECLARE Freq.
OMS
/SELECT TABLES
/IF COMMANDS = ["Frequencies"]
SUBTYPES = ["Frequencies"]
/DESTINATION FORMAT = SAV NUMBERED = TableNumber_
OUTFILE = Freq
VIEWER = NO
/TAG = "Freq".
 
SET TNU LAB.
 
FRE V1 to V3.
 
OMSEND TAG=['Freq'].
 
RESTORE.
 
DATAS ACT Freq.
REN VAR Label_=Variable.
VAR WID Variable (12).
 
COMP Unlabelled_Value=NUMERIC(Var2,F8.4).
SEL IF MIS(Unlabelled_Value)=0.
EXE.
 
MATC FIL FIL *
/KEE Variable Unlabelled_Value.
EXE.




 



 

Date: Thu, 23 Jul 2009 16:42:41 -0600
From: [hidden email]
Subject: Frequencies problems
To: [hidden email]

HI:
I´m using SPSS V13, and i have to check a long list of variables var1, var2, var3, etc.
For each variable I do a freq commnad which results in something like this:
freq var1.
                 Frequency
10. USA     471
11. MEX     25
12. CAN     251
13. AUS     375
14. BRA     71
80              117
98. DK/DA     1
As you can see 80 does not belong in var1 since it has no assigned label, this is the kind of errors that i need to identify, but being a long list of variables (120 vars), each of different nature, I was looking for some way to identify in which cases does an incorrect code was entered more efficiently, this being defined by an unlabeled values.
Regards,


See all the ways you can stay connected to friends and family
Reply | Threaded
Open this post in threaded view
|

Re: Tamhane's T2 reference

Marta Garcia-Granero
In reply to this post by Salbod
Hi tephen

Here's the reference:

Tamhane AC (1977) Multiple comparisons in model I one-way ANOVA with
unequal variances.Commun. Statist., Ser. B, 9, 167-178.

Anyway, it is considered very (too?) conservative. Even the author,
Tamhane, in his book MULTIPLE COMPARISONS PROCEDURES (Yosef Hochberg and
Ajit C Tamhane, 1987, Wiley series in Probability and Mathematical
Statistics, pp 193-4, ISBN 0-471-82222-1) states that Dunnett's T3 (also
available with SPSS) has better performance, while Games-Howell method
can be too liberal with unequal sample sizes. If your design is heavily
unbalanced (biggest sample more than 4 times the smallest), and
variances very different, then a rather conservative method (T2) will be
a guarantee against inflated type I error.

Just an afterthought. Some journals (Lancet, at least, used to) ask that
reference to non-common statistical methods should be given using books,
instead of the original paper (sometimes more difficult to consult that
a book). Therefore, perhaps you should use the book reference I have
given in the second paragraph, instead of the original
reference.Besides, the pages I mention deal specifically with the issue
of comparing the performance of the the different methods available for
unequal variances, instead of describing the maths involved in computing it.

I Hope I haven't bored you too much...

Marta GG

Salbod, Mr. Stephen wrote:

>
> Dear Friends,
>
> Good Morning (I’m in New York City).
>
> I need a reputable reference for using the Tamhane's T2 test. I got
> the info from a website that recommended it b/c of
>
> unequal cell sizes & homogeneity violations, but I don’t want use a
> website for the reference. Any recommendations?
>
> Have a nice day,
>
> Stephen Salbod, Pace University, NYC
>


--
For miscellaneous SPSS related statistical stuff, visit:
http://gjyp.nl/marta/

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: Tamhane's T2 reference

Granaas, Michael
RE: Tamhane's T2 reference

Marta said, in part:

"Just an afterthought. Some journals (Lancet, at least, used to) ask that
reference to non-common statistical methods should be given using books,
instead of the original paper (sometimes more difficult to consult that
a book). Therefore, perhaps you should use the book reference I have
given in the second paragraph, instead of the original
reference.Besides, the pages I mention deal specifically with the issue
of comparing the performance of the the different methods available for
unequal variances, instead of describing the maths involved in computing it."

Good advice on its own, but even better when you consider that newer references may call into question the usefulness of a given procedure. 

Buried in one of my piles I have an article by an author discussing referencing practices.  In one article he identified a statistical process as promising and likely of high value to those who would make use of it.  A couple of years later (3, I think) he wrote a follow-up indicating that the promise of the technique was not realized and it should be abandoned.  However, many years later his original article was being widely cited as support for the method and the second was ignored.

Based on Marta's breif description you may have a similar situation with the T2 statistic where even the originator would recommend a different approach. 

Michael
****************************************************
Michael Granaas             [hidden email]
Assoc. Prof.                Phone: 605 677 5295
Dept. of Psychology         FAX:  605 677 3195
University of South Dakota
414 E. Clark St.
Vermillion, SD 57069
*****************************************************




-----Original Message-----
From: SPSSX(r) Discussion on behalf of Marta García-Granero
Sent: Fri 7/24/09 9:25 AM
To: [hidden email]
Subject: Re: Tamhane's T2 reference

Hi tephen

Here's the reference:

Tamhane AC (1977) Multiple comparisons in model I one-way ANOVA with
unequal variances.Commun. Statist., Ser. B, 9, 167-178.

Anyway, it is considered very (too?) conservative. Even the author,
Tamhane, in his book MULTIPLE COMPARISONS PROCEDURES (Yosef Hochberg and
Ajit C Tamhane, 1987, Wiley series in Probability and Mathematical
Statistics, pp 193-4, ISBN 0-471-82222-1) states that Dunnett's T3 (also
available with SPSS) has better performance, while Games-Howell method
can be too liberal with unequal sample sizes. If your design is heavily
unbalanced (biggest sample more than 4 times the smallest), and
variances very different, then a rather conservative method (T2) will be
a guarantee against inflated type I error.

Just an afterthought. Some journals (Lancet, at least, used to) ask that
reference to non-common statistical methods should be given using books,
instead of the original paper (sometimes more difficult to consult that
a book). Therefore, perhaps you should use the book reference I have
given in the second paragraph, instead of the original
reference.Besides, the pages I mention deal specifically with the issue
of comparing the performance of the the different methods available for
unequal variances, instead of describing the maths involved in computing it.

I Hope I haven't bored you too much...

Marta GG

Salbod, Mr. Stephen wrote:
>
> Dear Friends,
>
> Good Morning (I'm in New York City).
>
> I need a reputable reference for using the Tamhane's T2 test. I got
> the info from a website that recommended it b/c of
>
> unequal cell sizes & homogeneity violations, but I don't want use a
> website for the reference. Any recommendations?
>
> Have a nice day,
>
> Stephen Salbod, Pace University, NYC
>


--
For miscellaneous SPSS related statistical stuff, visit:
http://gjyp.nl/marta/

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD