%RSD intersample calculation with custom fields

Hello everyone,

I'm having some troubles with the custom field calculations. I'll explain my case with a table. We have 3 samples, with 3 replicates and 3 injection each. We use the labels that follow

     (1)                 (2)               (3)
U0101 (3 inj)
U0102 (3 inj)      U01
U0103 (3 inj)

U0201 (3 inj)
U0202 (3 inj)      U02             U
U0203 (3 inj)

U0301 (3 inj)
U0302 (3 inj)      U03
U0303 (3 inj)


(1) To perform the injections average and %RSD I use the syntax CF1:SAME.%.%.AVE(Amount) or SAME.%.%.%RSD(Amount) and it gives you 9 values

(2)After that I create different CF with this syntax and you get 3 values
CF2: U01%.%.AVE(CF1) o U01%.%.%RSD(CF1) 
CF3: U02%.%.AVE(CF1) o U02%.%.%RSD(CF1)
CF4: U03%.%.AVE(CF1) o U03%.%.%RSD(CF1)

(3)At the time of performing the average of te three values (U01/U02/U03) I have 2 options:
   -CF5: U%.%.AVE(Amount) it gives you the average of the 27 values
   -(CF2+CF3+CF4)/3  it makes the average of the 3 values (U01/U02/U03). The result is the same in both cases.

   -
But in the case of the %RSD we cannot use U%.%.%RSD(Amount) because it gives you the %RSD of the 27 values and we want  the %RSD of U01,U02 and U03. The result is not the same. 

So we want to calculate the %RSD of U01/U02/U03 and we dont know which syntax do we have to write in the custom field

Could you please help me with this?

Thank you very much in advance

Comments

  • Hi

    If it is Average and % RSD you are after then can you not use the summary function in report with data filter conditions U01, U02 and U03. U* for n=27

    And/or right click on columns to hide them for summarising purposes Ie label for instance


  • Empower2019
    edited February 2020
    Hi landerbz. I think to get around this you should label each set of 3 samples the same so U1 for the 9 injections that make up the first sample batch, instead of U0101..etc. Then U2 for the next 9 and U3 for the last 9. Your Quantitate line can still reference U* in the label reference in order to calculate Amounts.
    Then you only need 2 CFs in total. The first is SAME.%..AVE(Amount) and the second is SAME.%..%RSD(Amount). Set search order to Result Set Only and when your result set is generated you should have 3 values each for each set of samples for both CFs, so an Average Amount per component for all the samples as per U1 then U2 etc. Same for %RSD- you now have the 3 figures that you want a further %RSD on instead of including the 27 individual amounts.
    To achieve this select your results, create a summary by all report and pick Amount Component table which is offered as standard. Instead of amount though, under "Component Summary" pick your CF used as per the SAME.%..%RSD(Amount) so for example call it Incremental_RSD then add a summary function of %RSD on this CF which is in the same tab as the Component Summary tab in the table. Set min and max and reporting precision as required.
    Next add some sample info to the table on the 1st tab so definitely add samplename and label and injection so you can clearly see the samples and their associated RSD value per 3 samples. Dont add peak type fields like Area or Retention time as it wont work. 
    Apply all your changes and bingo- you now have a table which shows both the RSD value per component per 9 injections then the RSD value of these 3 values at the end of the table. Make sure to order by Date Acquired ascending then Injection ascending for this to work.
    Same for Average just pick the Average CF under component summary and add the Mean function to get the overall average amount. Hope this helps.

    Edit: scrap the injection ascending order as the overall RSD values will be repeated and affect the final RSD value at the end. You only want 3 numbers in this table so to filter it to achieve this you can either filter by result id and pick the result id of the last injections of U1 U2 and U3 to give you 3 numbers to get an overall RSD on.
    Or...create a sample enum CF called Reference and set the Use as to Text. Have 2 entries in it N/A and RSD. In your sample set set a value of RSD on injection 3 of the final U1 the final U2 and the final U3 sample. Leave all other lines as N/A. Then process run and in the component table filter by Reference = N/A. This should lock in only the 3 RSD values as per injection 3 of U1 to U3 (remember injections 1 and 2 will be the same value but their inclusion in the table will skew that final RSD value). Now your final RSD value of the 3 values should be fine.
  • Hi Empower2019,

    Thank you for your comments but I am not sure that it could work.
    I cannot use U1 for the 9 injections instead of u0101,u0102 and u0103 because ech of them has a different sample weight, and I use sample weight in the calculations, so if I used only U1,U2 the calculations would be using which sample weight??

    Sample weight           My label Your label proposal
    10,50mg u0101 U1
    10,32mg u0102          U1
    10,08mg u0103 U1
    10,52mg u0201 U2
    10,36mg u0202 U2
    10,22mg u0203 U2
    Anyway I found the way to calculate the final %RSD value with a calculation and now I  have all the values with intermediate average and %RSD, and final ones.
  • Hi landerbz, the label of U1 or U2 etc can be used for multiple injections of samples, each sample doesn't have to have a different label, you could put U1 in the label reference opposite the Quantitate function and Empower will quantitate all samples labelled as U1 not just one of them, and you can put U2 next to that, so 2 entries in the Label Reference field if required. Your sampleweight is used in Amount calculations so this wont affect the label. As I said its the function of Quantitate and Label Ref which determines what samples are quantitated, they can always match your label system. 

    Im glad you got it to work anyway. 
  • Hi!

    We want to calculate RSD of the standard (P) and the last braket standard (PC) with custom field, but we are having some problems. I´m going to explain how we make the sample set:

    6 STD (label P as standard)
    1 STD2 (label P2 as control). We use it for another system suitability
    Samples (M1, M2, M3.... as unknown)
    STD (Label PC as control)

    We have tried different ways to calculate it without success.

    Can you help us?

    Thank you in advance!




  • Hi, you can use the report method for this.Create a new Summary by All report, include an "Area component Table" from the default options on the left of the tree, Filter by Label "Between" P and PC, then add a %RSD row as a summary for the areas of your active(s).
  • Thank you Empower2019, but we prefer to do it with CF but we don´t know how...
  • Ok, well you have 2 options then to calculate using CF.

    1. Change the label for Standard 2 control to anything that doesn't begin with P, so for example C, then create a peak, real, calculated custom field, Sample Type Standards Only, Peak Type All, Search Order Result Set Only, the formula is S%.%..%RSD(Area) or if its only one peak you want the RSD of you can change this to S%.%..%RSD(CCalRef1[Area]) and pick that peak as CCalRef1 in your processing method.


    2. If you cannot change the label for control and are stuck with P2, then set up another simple Sample, Text custom field called Reference, Width of 20, and in the sample set type in something simple like Label or Ref for all rows where you want the %RSD to consider so in your case you can put in Label for the sample labelled P and the sample labelled PC. All other rows put down N/A into Reference. Then your second custom field as above becomes S%.%..%RSD(Area*(EQ(Reference,"Label"))). Doing this will tell Empower only to calculate the %RSD of peaks in any samples where Reference is populated with Label. This makes the formula very flexible.


    Don't forget to add the line Summarize Custom Fields as last line of the sample set when processing the sample set as this function is needed for calculating %RSD.