IPRFILE= change codes for blocks of persons and items

Top Up Down  A A

IPRFILE= enables rectangles of item and person observations to be changed based on their data codes. This is done after reading in the data files and performing EDFILE= (if specified).

 

IPRFILE= file name

file containing details

IPRFILE = *

in-line list

IPRFILE = ?

opens a Browser window to find the file

 

IPRFILE= cannot add extra items. Please increase NI= to add extra items. Please specify the highest person beyond those in the data file by means of EDFILE=.

 

Several selections and recodings can be specified. An observation is recoded according to the first selection that it matches.

 

The format is:

IPRFILE=* (or IPRFILE= filename)

item-person-recode sublist or file

#ITEMS

start of item list (if omitted, select all items)

Item number

select this item

Item number - Item number

select this range of items

- Item number

exclude this item from this selection

- Item number - Item number

exclude this range of items item from this selection

"Item selection value"

select items using ISELECT= values, in quotation marks

- "Item selection value"

exclude these items

#PERSONS

start of person list (if omitted, select all persons)

Person number

select this person

Person number - Person number

select this range of persons

- Person number

exclude this person from this selection

- Person number - Person number

exclude this range of persons item from this selection

"Person selection value"

select persons using PSELECT= values, in quotation marks

- "Person selection value"

exclude these persons

#RECODE="codes"

a string of codes which align with the CODES= codes, and indicate the new code values. If a code in #RECODE= is not in CODES=, then it is interpreted as "change that valid code to missing data".

#MISSING="code"

this is the code in CODES= to replace "missing-data" in the selection. If this code is not in CODES=, then missing-data in the selection continues to be missing-data.

#

next selection begins (if any) ....

#ITEMS

start of list for items and persons not selected yet

......


#RECODE="codes"

list of codes for the second selection

#

next selection begins (if any) ....

#ITEMS

start of list for items and persons not selected yet

.....


*

end of IPRECORD=

 

Example 1:  Convert all responses to items 3 and 7-10 by persons 4 and 13-22 into missing (not  administered) data. Other missing responses are to be treated as incorrect.

 

NI = 16

; 16 item test

CODES = ABCDM

; the data are multiple-choice responses

IPRFILE = *

; start of rectangular recode

#ITEMS

; list of items to select

3


7-10


#PERSONS

; list of persons to select

4


13-22


; CODES = ABCDM

; this comment is a reminder of the CODES=

#RECODE = MMMMM

; A,B,C, D will all be converted to invalid code

*


IREFER = CBADBACDDCCABDBA

; same as scoring key (for convenience)

; CODES = ABCDM

; comment: another reminder

IVALUEA = 1000M

; A scored 1. M scored "M", non-numeric, "missing, not administered"

IVALUEB = 0100M

; B scored 1

IVALUEC = 0010M

; C scored 1

IVALUED = 0001M

; D scored 1

MISSING-SCORED = 0

; all responses not in CODES= scored 0.

 

Example 2:  Convert all "C" responses to items 3 and 7-10 by persons 4 and 13-22 into "A".

Convert all "C" responses to the other items by persons 4 and 13-22 into "B".

Convert all other "C" responses into "D".

 

CODES = ABCD

; valid data codes

IPRFILE = *

; start of rectangular recode

#ITEMS

; list of items to select

3


7-10


#PERSONS

; list of persons to select

4


13-22


; CODES = ABCD

; this comment is a reminder of the CODES=

#RECODE = ABAD

; C is converted into A

#

; end of this recode: start of next recode

; #ITEMS

; commented out: applies to all items

#PERSONS


4


13-22


#RECODE = ABBD

; C is converted into B

; #ITEMS

; commented out: applies to all items

; #PERSONS

; commented out: applies to all persons

#RECODE = ABDD

; C is converted into D

*


 

 

Example 3: Select everyone with a person label beginning "A". Make their responses to items with labels starting "Z" into missing data.

 

CODES = ABCD

; valid data codes

IPRFILE = *

; start of rectangular recode

; #ITEMS

; commented out - all items

"Z"

;Item labels starting Z

#PERSONS

; list of persons to select

"A"

; person labels starting A

; CODES = ABCD

; this comment is a reminder of the CODES=

#RECODE = ....

; All responses made missing.

*