Data checking

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

Data checking

Kunal
This post was updated on .
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: Data checking

David Marso
Administrator
Please define your question with greater specificity.
What do you mean by 'check'?
If all fields are of same type you could try a vector and loop in reverse then flag the first non missing.
It only takes a few minutes to properly frame the context for a question and then only a few seconds to proofread.  Please attempt to do so in the future!

Kunal wrote
Is there any wany in SPSS we can check the last column punched by a respondent in data,
Please reply to the list and not to my personal email.
Those desiring my consulting or training services please feel free to email me.
---
"Nolite dare sanctum canibus neque mittatis margaritas vestras ante porcos ne forte conculcent eas pedibus suis."
Cum es damnatorum possederunt porcos iens ut salire off sanguinum cliff in abyssum?"
Reply | Threaded
Open this post in threaded view
|

Re: Data checking

David Marso
Administrator
This post was updated on .
Kunal,
Browsing back through your posting history on this group you are consistently TOO LAZY to define your questions in ANY DETAIL.  Or you expect us to be using eSPSS or something? Telepathy?
Get with the program!!!  I strongly suggest you read the TIPS on posting thread which is a pinned topic in the Nabble archive!
http://spssx-discussion.1045642.n5.nabble.com/Tips-on-Posting-questions-to-the-SPSS-list-td5715038.html

David Marso wrote
Please define your question with greater specificity.
What do you mean by 'check'?
If all fields are of same type you could try a vector and loop in reverse then flag the first non missing.
It only takes a few minutes to properly frame the context for a question and then only a few seconds to proofread.  Please attempt to do so in the future!

Kunal wrote
Is there any wany in SPSS we can check the last column punched by a respondent in data,
Please reply to the list and not to my personal email.
Those desiring my consulting or training services please feel free to email me.
---
"Nolite dare sanctum canibus neque mittatis margaritas vestras ante porcos ne forte conculcent eas pedibus suis."
Cum es damnatorum possederunt porcos iens ut salire off sanguinum cliff in abyssum?"
Reply | Threaded
Open this post in threaded view
|

Re: Data checking

Kunal
In reply to this post by David Marso
Thanks David for the reply and sorry for not clearly discussing my query.

I have a SPSS data file and I want to check the last column the respondent has entered data.

Suppose there are 4 questions from q1 to q4 and we need to check the last column in which respondent has entered data.


For eg - Respid 34  has entered data q1 q2 q3 q4_1 q4_2 q4_3 and not in q4_4 so it displays that respid has data till q4_3.
Reply | Threaded
Open this post in threaded view
|

Re: Data checking

David Marso
Administrator
You still have NOT clearly discussed your query!
I wrote previously:
"If all fields are of same type you could try a vector and loop in reverse then flag the first non missing. "
Have you bothered to look into that?

Kunal wrote
Thanks David for the reply and sorry for not clearly discussing my query.

I have a SPSS data file and I want to check the last column the respondent has entered data.

Suppose there are 4 questions from q1 to q4 and we need to check the last column in which respondent has entered data.


For eg - Respid 34  has entered data q1 q2 q3 q4_1 q4_2 q4_3 and not in q4_4 so it displays that respid has data till q4_3.
Please reply to the list and not to my personal email.
Those desiring my consulting or training services please feel free to email me.
---
"Nolite dare sanctum canibus neque mittatis margaritas vestras ante porcos ne forte conculcent eas pedibus suis."
Cum es damnatorum possederunt porcos iens ut salire off sanguinum cliff in abyssum?"
Reply | Threaded
Open this post in threaded view
|

Re: Data checking

Kunal
This post was updated on .
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: Data checking

Art Kendall
In reply to this post by Kunal
Please describe the context in which this question arises.
Is this,e.g., a timed school test where some test takers do not get to the end of the test?

Are you working with summative scales, surveys, experiments, existing data, etc.

A lot depends on the context.  One thing that works in some contexts is to pre-populate or set defaults data to a user missing data code
Art Kendall
Social Research Consultants
Reply | Threaded
Open this post in threaded view
|

Re: Data checking

David Marso
Administrator
In reply to this post by Kunal
VECTOR vars=<firstvar> TO <lastvar>.
COMPUTE <lastvarindex> = 0.
LOOP #varindex=<nvars> TO 1 BY -1.
IF NOT(MISSING(vars(#varindex)) <lastvarindex> = #varindex.
END LOOP IF <lastvarindex> NE 0.

You need to fill in appropriate values for things inside <>.


Kunal wrote
Hi David,

Yes all the fields of type numeric.

Can you please share an example/Syntax.

Regards,
Kunal
Please reply to the list and not to my personal email.
Those desiring my consulting or training services please feel free to email me.
---
"Nolite dare sanctum canibus neque mittatis margaritas vestras ante porcos ne forte conculcent eas pedibus suis."
Cum es damnatorum possederunt porcos iens ut salire off sanguinum cliff in abyssum?"
Reply | Threaded
Open this post in threaded view
|

Re: Data checking

David Marso
Administrator
This is much better (no need to deal with magic numbers or varnames).
--

/*NEW FILE.
/*DATASET CLOSE ALL.
DATA LIST FREE / a b c.
BEGIN DATA
1 2 .   2 3 4   5 4 .   1 . .
END DATA.

COMPUTE Case=$CASENUM.
MATCH FILES /FILE * / KEEP Case ALL.
DATASET NAME RawData.
DATASET COPY CopyRaw.
DATASET ACTIVATE CopyRaw.
VARSTOCASES ID=Case / MAKE v FROM ALL / INDEX=LastVarname(v).
MATCH FILES /FILE * / BY Case / LAST = Flag.
SELECT IF Flag.
MATCH FILES / FILE RawData / FILE * / BY Case.
EXECUTE.
DELETE VARIABLES v Flag.
LIST.

David Marso wrote
VECTOR vars=<firstvar> TO <lastvar>.
COMPUTE <lastvarindex> = 0.
LOOP #varindex=<nvars> TO 1 BY -1.
IF NOT(MISSING(vars(#varindex)) <lastvarindex> = #varindex.
END LOOP IF <lastvarindex> NE 0.

You need to fill in appropriate values for things inside <>.


Kunal wrote
Hi David,

Yes all the fields of type numeric.

Can you please share an example/Syntax.

Regards,
Kunal
Please reply to the list and not to my personal email.
Those desiring my consulting or training services please feel free to email me.
---
"Nolite dare sanctum canibus neque mittatis margaritas vestras ante porcos ne forte conculcent eas pedibus suis."
Cum es damnatorum possederunt porcos iens ut salire off sanguinum cliff in abyssum?"