I tried to port FDA’s SAS-code for replicate BE-studies (progesterone guidance). Got lost in the partial replicate since I’m not a ‘native speaker’ of SAS. The full replicate was easier, but two points are nasty: There’s no min/max-function in Phoenix. Had to set up a workaround for code^2[/code] as if(abs(X)>=abs(B1),(abs(X))^2,(abs(Y))^2)
Even Excel could run the first formula… Now for the showstopper: there are no statistical distributions accessible in custom transformations. For FDA’s method we need the quantile of the Chi ²-distribution. End of story. No RSABE for FDA submission. ~30% of all drugs are highly variable (CV >30%). Ideas? P.S.: Four lines of SAS-code are missing in FDA’s guidance. If you want to copypaste, get the complete code here. P.P.S.: Would anybody take care about the Preview-function here (shows the main page – not the post)?
Dear Helmut, Thank you for your suggestions. These requests have been logged as ID QC 11570 and 11571 for future consideration. We won’t be able to have this in the next release of PHX version 1.3 as we are already entering the testing stage for release at then end of this quarter. Best regards, Ana
Hi Ana, THX! Just found other ones: “and” & “or”. Instead of a simple statement like if(pointest>=0.8 and pointest<1.25 and critbound<=0,"RSABE","not RSABE")
I had to clumsily use a series of transformations, i.e.: PE1 if(pointest>=0.8,1,0) PE2 if(pointest<=1.25,1,0) PE if(PE1+PE2=2,1,0) Bound if(critbound<=0,1,0)
and finallyif(PE+Bound=2,"RSABE","not RSABE")
Hi Helmut, The functions ‘and’ (need to be typed as &) and ‘or’ (need to be typed as |) were added in PHX 1.2. When using them, the arguments need to be in paranthesis. Example If ((a=0)&(b=1), true, false) or If ((a=0)|(b=1), true, false) The release note stated: Support for Logical ‘And’ and ‘Or’ in Custom transformation (QC 8469): Support has been added for the logical operator ‘and’ and ‘or’ by using the symbols ‘&’ and ‘|’, respectively. In custom column transformations, each condition must be in parentheses. For example, if((col1=1) & (col2=2), 1, 0). Let me know if you have any questions Ana
Hi Ana, great – saves 4 lines of code! Must confess that I searched only in the function list and the manual… Edit: I think I have posted it somewhere else, but can’t find it. I’m confused on how PHX treats empty cells (numeric columns). Example: 4 columns (T1, T2, R1, R2) and a transformation y=0.5*(T1+T2-R1-R2). I get empty cells, but only if one of the R-columns is empty. T1 T2 R1 R2 y 7 8 8 7 0 8 8 8 -4 8 8 8 -4 7 7 7 -3.5 9 8 9 8 8 7 7 8 5
I would expect y (0, -4, -4, -3.5, 0.5, 4.5, 0, 1.5) Edit: Crazy. 0.5*(T1+T2)-0.5*(R1+R2) works.
Hi Helmut, In general, PHX doesn’t do calculations on null data, if the data is null any operation on it will also be null. To get around that one would need to set all the blank data to 0, the easiest way is to do a filter and use a replace action to find=NULL and replace=0 and then apply your transformation to that result. As far as why one formula works and the other doesn’t, we’ll have to look further into it. Thanks, Ana
Hi Ana, not using empty cells makes sense, of course. What I want to do is validate PHX for FDA’s SAS code. Since I don’t have SAS, I have no ideas how it deals with empty cells (the infamous “.”). I’ve attached a test project (hopefully covering all potential cases). Column y1 is FDA’s code. Interesting that average() and sum() treat empty cells as zero (like Excel) What puzzles me is the difference between rows 4 and 5. In the former case I have one empty cell in column1 and get a result (as if the empty cell = 0) and in the latter one empty cell in column 4 and I don’t get a result. If only non-empty cells are used why do I get results in rows 2 & 3? However I have to deal with FDA’s code; it would be very helpful if you could check SAS’ behavior and come up with an implementation in PHX. [file name=Empty_cells_test_case.phxproj size=410098]Certara | Drug Development Solutions (400 KB)
Hi Helmut, Some more details on PHX behaviour: Adding cells with values to others with blanks returns a value (blank cells are considered 0). Subtracting cells with values to one (or more) with no value returns blank cells. Multiplying./Dividing cells with value to one (or more) with no value returns blank cells) In your previous example The formula 0.5(T1+T2-R1-R2) would return blank cells because of the subtraction The formula 0.5(T1+T2)-0.5(R1+R2) would not return blank cells because there is only addition. We do need to document this better. Thanks, Ana
Hi Ana, THX for the clarification. [quote]We do need to document this better.[/quote] Yes. I guess that SAS will give “.” in y1 for all rows except the first one (complete data). Can you check?
HI Helmut,
As you suspected, in SAS you get results only on data that has non-missing data regardless of the operation. Therefore only row 1 in the example we have been talking about gets results. It only does operations on data that is not blank (or ‘.’) including addition
3 + . = .
Project attached to illustrate this.
Ana [file name=CT_Blanks.phxproj size=160248]Certara | Drug Development Solutions (156 KB)