syntax - SPSS- assigning mulitple numeric codes to one variable -


I am trying to assign several codes to the existing variable. I am using the syntax below, but it will only specify the first code for that code. hosp.id.number .

Syntax Example:

  What to do (Hosp.ID = 9037) or (Hosp.ID = 1058) or (Hosp.ID = 11256). Calculate Roll_Em_communication = 10 Other if the code ends (HSP.ID.No. 9037. Compute Roll_Em_communication = 11). carry about.  

hosp.id.number needs to be coded 10 and 11, but it will only provide code at 10. Still refresh so that SPSS accepts 2 or more codes for a variable like hosp.id.number ?

Your role_EM_communication variable is a variable, But what you are saying, I think you need it set (for the same record, it can only carry more than one code). Therefore, you have the variable n code> role_EM_communication_n named role_EM_communication_1 , where n will be possible for a record of the maximum number of code you anticipated.

For your example, it will translate like this:

create 2 variables:

  vector role_EM_communication_ (2, f2.0).  

First recall:

  if any (Hosp.Id.Number, 9037,1058,11256) roll_Em_communication_1 = 10  

Very important - perform recode

  exe  

Check that the first variable has data, and if the second truth is true:

  If Miss (role_EM_communication_1) and any (hosp.id.number), 9037) role_Em_communication_1 = 11 if ~ miss (role_EM_communication_1) and any (Hosp.D., 9037) role_Em_communication_2 = 11 exe.  

Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -