problems with Hwk #2

problems with Hwk #2

by Ying Yang -
Number of replies: 1

Hi, I do not understand from the beginning. In question 1, should the race_other be somehow associated with race? Maybe race_other indicates the subgroup of the same race code? So that's how we know that race_other data are inconsistent? Because I do not understand what race_other means, I could not give any suggestion on how to fix the inconsistencies. 

For question 2, I use derive to recode Age, I could set age = 000 to "not recorded" and age >=200 to "less than 2 years old", but how can I set the default value to the same as in the age? Or I used the wrong node?

Also in question 2, to use Filler to change age >= 200 to any number I want as long as it is less than 2? 

I feel that I do not know how to do anything at all... very frustrated. 

 

 

In reply to Ying Yang

Re: problems with Hwk #2

by Anoop Sheshadri -

When you look at the values put down for race_other and think about how the program might process those text strings, what problems might it run into? That is, with those values written the way they are now, would the program be able to interpret them? If not, then why not? 

For question 2 I also used derive to recode Age. You can build an if/then statement which they should have in the calculator. The "else" condition can simply be "age", in which case it defaults to the original value unless it meets whatever condition you have specified. 

In terms of the filler node, you can set the value to be less than 2, but you can also set the value by using the derive node as you have above. You can consider putting it an expression to get the exact value by changing the month part to a decimal version of years, or you can just use a number less than 2 that you find appropriate. You don't necessarily need to use the filler node AND the derive node. I'd argue that the derive node can utilize the available data better.

Let me know if this helps!