Millisecond Forums

Calculate percentile without all means

https://forums.millisecond.com/Topic20793.aspx

By splukkel - 2/19/2017

Hi!

I'm using a script from the library (tipi.iqx).

To calculate the percentiles in this script, it is using the means and SD of females, males, or all.
For the survey I want to use, I only have data of females and males. But not the 'all'.

Can I delete the allMeans and allSD from the script below? There's a question in the survey asking for the sex, and it is required to answer. 
I don't know what exactly I can delete in this part and what not. I'm just a beginner with Inquisit and I don't understand the 'else' in this expression. 
So I'm not sure if I just can delete a part of it. 

I hope you can help.

/ calculateE_percentile = {
if (parameters.calculateGenderPercentile == true){
if (radiobuttons.gender.response == 2){
values.z_E = (expressions.Extraversion - list.maleMeans.item(1))/list.maleSD.item(1);
} else {
values.z_E = (expressions.Extraversion - list.femaleMeans.item(1))/list.femaleSD.item(1);
};
} else {
values.z_E = (expressions.Extraversion - list.allMeans.item(1))/list.allSD.item(1);
};
values.E_percentile = pofz(values.z_E);
}
By Dave - 2/19/2017

splukkel - Monday, February 20, 2017
Hi!

I'm using a script from the library (tipi.iqx).

To calculate the percentiles in this script, it is using the means and SD of females, males, or all.
For the survey I want to use, I only have data of females and males. But not the 'all'.

Can I delete the allMeans and allSD from the script below? There's a question in the survey asking for the sex, and it is required to answer. 
I don't know what exactly I can delete in this part and what not. I'm just a beginner with Inquisit and I don't understand the 'else' in this expression. 
So I'm not sure if I just can delete a part of it. 

I hope you can help.

/ calculateE_percentile = {
if (parameters.calculateGenderPercentile == true){
if (radiobuttons.gender.response == 2){
values.z_E = (expressions.Extraversion - list.maleMeans.item(1))/list.maleSD.item(1);
} else {
values.z_E = (expressions.Extraversion - list.femaleMeans.item(1))/list.femaleSD.item(1);
};
} else {
values.z_E = (expressions.Extraversion - list.allMeans.item(1))/list.allSD.item(1);
};
values.E_percentile = pofz(values.z_E);
}

You don't need to delete anything. If you want gender-specific percentiles calculated, all you need to make sure is that the /calculateGenderPercentile <parameter> is set to 'true', as detailed in the script's <usermanual>:

/calculateGenderPercentile:
true (1) = z-score and percentiles are calculated based on gender norms (provided by Gosling et al, 2003, p.526) - can be set under Editable Parameters
false (0) = z-score and percentiles are calculated using the overall norms (provided by Gosling et al, 2003, p.526)
By splukkel - 2/20/2017

Okay, that's clear! Thanks :)