pspp-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Pspp-users and 2 problems with the Windows version


From: Alan Mead
Subject: Re: Pspp-users and 2 problems with the Windows version
Date: Fri, 02 Jan 2015 19:01:12 -0600
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0

Robin,

I haven't investigated/tried to replicate etc. It's possible that there is a bug.  However, I can se what's going on in your data from the output.  I often get a low alpha when I forget to score items and if v1 is about satisfaction and v3 & v5 indicate types of dissatisfaction, then you need to reverse score v1 or both v3 & v5 (and many would prefer the latter so that larger values of the "scale" composed of v1+v3+v5 indicate greater satisfaction). When I look at the table of results, it looks like v3 is reversed but v5 is not. I base that on the -.60 CITC for v5. The column on the far right tells you that alpha would rise to 0.91 (from -.15) if you dropped v5. Whenever you get a large negative CITC that's always an indication of a mis-scored item. Also, unless 6.59 is the midpoint of the scale, it would be weird for people to report exactly as much satisfaction on v1 as dissatisfaction on v3 (hence I assume v3 has been reversed); the mean for v5 is a bit lower. I have no idea why v3 would already be reversed and v5 not, but such issues are common in SAV files where you cannot know what transformations have been applied previously.

So, I don't know what the scale is.  If v5 is numeric and has values 1-10 with no garbage, then you could use this syntax to create a new scored v5:

compute v5.scored = 11 - v5.
execute.

If you wanted to be more careful, you could use recode:

recode v5 (10=1) (9=2) (8=3) (7=4) (6=5) (5=6) (4=7) (3=8) (2=9) (1=10) (ELSE=SYSMIS) into v5.scored.
execute.

I call the second approach "careful" because if some cases have garbage values, say, 21 for v5, then the first bit of code would happy "reverse" it to -10 which is clearly false.  The second bit of code will force unexpected values to be missing.

BTW, reliabilities uses listwise deletion so any case with a missing value on v1, v3, or v5 is removed.  That's expedient but never ideal and can sometimes be surprising.

I don't like syntax that changes the database (unless that's the point, a lot of SPSS/PSPP usage is to manipulate data, versus "analysis").  I prefer to write syntax that I can safely re-run. Whenever you are "scoring" or "transforming" or "reversing" that operation CANNOT ebe safely repeated unless you create a new scored/transformed/reversed variable.  So, in both cases, the code produces a new variable called "v5.scored" (which is valid in newer SPSS versions; if PSPP chokes on the period, change it to an underscore or just delete it).  This way, if you make a mistake in scoring, it's trivial to fix it and re-run the correct syntax.  If you changed the value of v5 (instead of making new variables) then you would need to either restore the database from a known source or carefully reverse exactly the steps you took.  It's a really good idea to avoid changing existing data (again, unless that's the entire point).

For example, I once wrote code like this:

recode v1 (1=5) (2=4) ... (else=sysmis).
recode v3 (1=5) (2=4) ... (else=sysmis).
recode v5/ (1=5) (2=4) ... (else=sysmis).
execute.

When SPSS ran it (I don't know what PSPP would do) it executed the recoding for v1 and v3 but the line for v5 has a typo and it fails. So, I end up with my variables partially recoded. If you (a) notice this immediately and (b) see exactly what went wrong and (c) make no mistakes in fixing it, then you're all set.  Otherwise, you have a problem.  If my code had instead created new variables, it would be no problem to simply fix my code and re-run it (I would simply be re-creating any variables that had been created). BTW, I would have been smarter to make a single statement:

recode v1 v3 v5 (1=5) (2=4) ... (else=sysmis).
execute.

That way, is there is a typo then the whole command fails.  Of course, you can only do this is the 1=5, 2=4, etc. recoding is the same for all the variables you list.  And you cannot make new variables this way.

Sorry for the tangent..  There's probably a way to do thus in the GUI but I find syntax much, much easier for these kinds of tasks and as a result I don't know what the GUI route is.

To attach variable and value labels, you could create the variables and then open the "variable view" of the data window and manually add labels.  Or use syntax (from memory, may have typos):

variable labels v5 'There was too much noise in the rooms.'
  /v5.scored 'There was too much noise in the rooms. (R)'
.
execute.

value labels v5 1 '1 out of 10' 10 '10 out of 10'
  /v5.scored 1 '10 out of 10' 10 '1 out of 10'
.
execute.

Similarly to create dummy coded variables for regression, I'd use recode.  If you had X1 which had nominal values 1, 2, 3, 4 then you make 3 dummy codes:

recode x1 (1=1) (2=0) (3=0) (4=0) (else=SYSMIS) into x1.dum1.
recode x1 (1=0) (2=1) (3=0) (4=0) (else=SYSMIS) into x1.dum2.
recode x1 (1=0) (2=0) (3=1) (4=0) (else=SYSMIS) into x1.dum3.
execute.

This isn't the only way to create three dummy variables for four levels. The level that is not encoded (x1=4, in this case) is the reference level (the raw regression weights are "step sizes" relative to the reference group, group 4 of x1 in this case) so you might prefer, say, X1=2 as the reference and your code would look different but you get the idea.  You can also use compute. Here's what I would write:

compute x1.dum1 = 0.
compute x1.dum2 = 0.
compute x1.dum3 = 0.
execute.
if( x1=1 ) x1.dum1 = 1.
if( x1=2 ) x1.dum2 = 1.
if( x1=3 ) x1.dum3 = 1.
execute.

Again, this code is a little less "careful."  A garbage value of X1 (anything other than 1, 2, or 3) would get encoded as the fourth level (which is probably a serious mistake).

I hope this helps.

-Alan




On 1/2/2015 4:24 PM, Robin Reeves wrote:
Hi Robin here again,

I've been working through sections 5.2.3 and 5.2.4 on pages 19 and 20 of the manual with the hotel.sav sample file.

I've repeated the steps about computing v3 to be 6 - the old v3 and v5 to be 6 - the old v5
and then testing the reliability of variables v1, v3 and v5 but Cronbach's Alpha comes out at -0.15, not as 0.86 as it says in the manual.

The steps below are from the Output file of what I did:

GET

GET FILE="F:\hotel.sav".

COMPUTE

COMPUTE v3 = 6-v3.

EXECUTE

EXECUTE.

COMPUTE

COMPUTE v5 = 6-v5.

EXECUTE

EXECUTE.

RELIABILITY

RELIABILITY /VARIABLES= v1 v3 v5 /MODEL=ALPHA /SUMMARY = TOTAL.

Scale: ANY

Case Processing Summary

 

 

N

%

Cases

Valid

17

100.00

 

Excluded

0

.00

 

Total

17

100.00

Reliability Statistics

Cronbach's Alpha

N of Items

-.15

3

Item-Total Statistics

 

Scale Mean if Item Deleted

Scale Variance if Item Deleted

Corrected Item-Total Correlation

Cronbach's Alpha if Item Deleted

I am satisfied with the level of service

6.59

1.51

.36

-2.32

The staff were slow in responding

6.59

1.38

.47

-2.89

There was too much noise in the rooms

5.18

7.15

-.60

.91


I wonder why?

My second problem is that I have been trying to do some regression analysis with a data file h23adapted.sav (attached) which I got from the following web page:
On that web page the author explains how to make dummy variables 'familys' and 'biology' from the three level categorical data in the 'dept' variable. 
I've been trying to do it in PSPP using "Transform" then the "Recode in Different Variable" option. I can get Dept to be the Old variable but I can't get PSPP to take anything in the Output Variable Name or Label. I can get to the Old and New Values window and recode all the old values to new values but I can't tell PSPP the name of the output variable even though I have created my two dummy variables familys and biology (Screenshot attached).

Please could you tell me if I am not doing the right thing or are both my problems (Cronbach's Aplha value and the problem recoding into different variables) to do with the Windows version of PSPP which are fine on non-Windows platforms?

Thanks,
Robin  



> From: address@hidden
> Subject: Pspp-users Digest, Vol 104, Issue 1
> To: address@hidden
> Date: Fri, 2 Jan 2015 12:00:12 -0500
>
> Send Pspp-users mailing list submissions to
> address@hidden
>
> To subscribe or unsubscribe via the World Wide Web, visit
> https://lists.gnu.org/mailman/listinfo/pspp-users
> or, via email, send a message with subject or body 'help' to
> address@hidden
>
> You can reach the person managing the list at
> address@hidden
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Pspp-users digest..."
>
>
> Today's Topics:
>
> 1. Re: Re: Windows PSPPIRE/PSPP is pretty wonky (Harry Thijssen)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Thu, 1 Jan 2015 20:43:38 +0100
> From: Harry Thijssen <address@hidden>
> To: "address@hidden" <address@hidden>
> Subject: Re: Re: Windows PSPPIRE/PSPP is pretty wonky
> Message-ID:
> <address@hidden>
> Content-Type: text/plain; charset="iso-8859-1"
>
> >
> > On Tue, Dec 30, 2014 at 04:58:48PM -0600, Alan Mead wrote:
> > John and Harry,
> >
> > PSPPIRE.exe 0.8.4-g5ce6b1 (and the associated PSPP) is pretty wonky.
> > Paste doesn't work correctly (I believe that's a know issue?). To
> > paste
> > syntax into the syntax window, I had to right-click and choose paste;
> > neither Control-v or Edit > Paste would paste the text.
> >
>
> I could reproduce this and it is indeed realy strange. It is not limited to
> the syntax window, but the same happens in the dataview. If you copy some
> data from outside PSPPIRE (for example from notepad to psppire) you can
> only paste it in PSPPIRE when you right-click. Data copied from inside
> PSPPIRE (for instance from dataview to syntax editor) can be copied pasted
> the usual way!
> A reason for this.......I have no idea...
>
>
> > And Run > Current line wasn't working (but now I cannot replicate it,
> > I'm guessing it has to do with where the cursor was rather than which
> > line of the syntax window was "shaded"). What was most annoying is
> > that
> > by "not working" I mean that the output window would flash but there
> > was
> > no additional output in the window and no warning or error.
> >
>
> I could only reproduce this if the current line is part of a command on
> several lines.
>
> I don't know why this should be. Perhaps Harry can shed some light on it.
> >
> > And then look at the boxplot I got when I ran Robin's syntax on the
> > physio data (attached "boxplot.png")... I don't use examine and I
> > don't
> > know what " /STATISTICS = EXTREME (3)" is meant to do, but I know
> > what a
> > boxplot is and there shouldn't be values like 9999999 between 1200 and
> > 200 on the y-axis.
> >
> > [ EXTREME (3) reporst the largest and smallest three values of the
> > variable ]
> >
> > Regarding the 99999 issue, I certainly don't get that on GNU/Linux - my
> > guess is that
> > Windows has rounding issues and is miscalculating 300 as
> > 299.99999999999999 (the left
> > hand side is off the page).
> >
>
> Maybe it is possible to round it when used on the axis.
>
> Happy new year to everybody and
> Have fun
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <http://lists.gnu.org/archive/html/pspp-users/attachments/20150101/e63bf4d9/attachment.html>
>
> ------------------------------
>
> _______________________________________________
> Pspp-users mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/pspp-users
>
>
> End of Pspp-users Digest, Vol 104, Issue 1
> ******************************************


_______________________________________________
Pspp-users mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/pspp-users

-- 

Alan D. Mead, Ph.D.
President, Talent Algorithms Inc.

science + technology = better workers

+815.588.3846 (Office)
+267.334.4143 (Mobile)

http://www.alanmead.org

Announcing the Journal of Computerized Adaptive Testing (JCAT), a
peer-reviewed electronic journal designed to advance the science and
practice of computerized adaptive testing: http://www.iacat.org/jcat

reply via email to

[Prev in Thread] Current Thread [Next in Thread]