dbTalk Databases Forums  

Deriving index of ancestry from Value list

comp.databases.filemaker comp.databases.filemaker


Discuss Deriving index of ancestry from Value list in the comp.databases.filemaker forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
D.
 
Posts: n/a

Default Deriving index of ancestry from Value list - 11-07-2005 , 09:49 PM






Hi,

I have a four fields that were defined by subjects checking off answers
on a value list. Subjects could check European, Asian, and/or Russian
for the ancestry of each of their grandparents.
I want to make an index which says what percentage of each ethnicity
someone is. So if someone has 3 asian grandparents, I would calculate 3
for another field called Asian. Thanks to a superfast response to my
last question, I found that the PatternCount function almost gets me
what I need.
If I say "patterncount( Grandparent1 & Grandparent2 & Grandparent3 &
Grandparent4, Asian)", I will get 3. I could make three fields,
European, Asian, and Russian that each calculate the percentage of the
relevant ethnicity in a similar manner. (For some reason the If
function does not seem to work on this text field derived from a value
list).

My problem is if someone has a multiracial ancestor. If, for example
they have 3 asian grandparents and one who is asian-russian, I would
want a value of 3.5 returned.

Anyone know how to do this?

Thanks,
Dan


Reply With Quote
  #2  
Old   
42
 
Posts: n/a

Default Re: Deriving index of ancestry from Value list - 11-07-2005 , 11:15 PM






In article <1131421774.735390.216190 (AT) g47g2000cwa (DOT) googlegroups.com>,
dtae (AT) yahoo (DOT) com says...
Quote:
Hi,

I have a four fields that were defined by subjects checking off answers
on a value list. Subjects could check European, Asian, and/or Russian
for the ancestry of each of their grandparents.
I want to make an index which says what percentage of each ethnicity
someone is. So if someone has 3 asian grandparents, I would calculate 3
for another field called Asian. Thanks to a superfast response to my
last question, I found that the PatternCount function almost gets me
what I need.
If I say "patterncount( Grandparent1 & Grandparent2 & Grandparent3 &
Grandparent4, Asian)", I will get 3. I could make three fields,
European, Asian, and Russian that each calculate the percentage of the
relevant ethnicity in a similar manner. (For some reason the If
function does not seem to work on this text field derived from a value
list).

My problem is if someone has a multiracial ancestor. If, for example
they have 3 asian grandparents and one who is asian-russian, I would
want a value of 3.5 returned.

Anyone know how to do this?
Pretty much the way you are doing it now; except that you need to deal
with the possibility of fractional ratios within each field.

So you need the total number of values in each field as well to divide
by:

so your Asian field would be:

patterncount(Grandparent1, "Asian")/valuecount(Grandparent1)+
patterncount(Grandparent2, "Asian")/valuecount(Grandparent2)+
patterncount(Grandparetn3, "Asian")/valuecount(Grandparent3)+
patterncount(Grandparent4, "Asian")/valuecount(Grandparent4)

so grandparents 1..4 =
{Asian},{Asian}, {Asian}, {Asian, Russian}
it will evaluate to:

1/1 + 1/1 + 1/1 + 1/2 = 3.5

and your russian field, on the above data:

0/1 + 0/1 + 0/1 + 1/2 = 0.5

-best regards,
Dave


Reply With Quote
  #3  
Old   
D.
 
Posts: n/a

Default Re: Deriving index of ancestry from Value list - 11-08-2005 , 09:29 PM



Dave, Much thanks for the quick reply.

ValueCount looks like the perfect solution, except I am using Pro 5.5,
which does not seem to have that function yet. Does anyone know of a
reasonable way of accomplishing the same thing with 5.5?

Otherwise perhaps I will upgrade to 7 (I have a copy laying around, but
have been refraining from the upgrade because collaborators I work with
don't have 7 and the files don't seem to be backward compatible).


Reply With Quote
  #4  
Old   
D.
 
Posts: n/a

Default Re: Deriving index of ancestry from Value list - 11-11-2005 , 02:55 PM



I got my answer in anothr post:
http://groups.google.com/group/comp....2c6a05dcedae0b

Just use patterncount to count the number of carriage returns + 1


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.