sasikumar
☆    

Tamilnadu, India,
2008-04-03 11:19
(5839 d 02:54 ago)

Posting: # 1755
Views: 28,389
 

 Sample Size Calculation [Software]

Dear All,

Thanks for your previous prompt answer for CV calculation!

I used the following SAS Procedure for Sample Size Calculation and I hope that it would have been a right procdure for calculating power and sample size for BA/BE studies.

How to calculate manually while I am using log transformed data?
Please help me in this regard for manual calculation especially "meanratio" and "Lower and Upper bound" and "CV" or give me a practical example with formula or any material.

proc power;
 Twosamplemeans
  test      = Equiv_ratio
  dist      = lognormal
  meanratio = .1
  CV        = 1.05
  lower     = .80   /*I have doubt that how to fix lower and upper bound, I have doubt that  20% of reference mean of ln transformed or unlogtransformed*/
  upper     = 1.20
  alpha     = 0.01
  power     = .8 .9
  total     = .;
run;


Thanks in advance,

S.Sasikumar


Edit: Reformatted using BBCode 'code' [Helmut]
Jaime_R
★★  

Barcelona,
2008-04-03 15:13
(5838 d 23:01 ago)

@ sasikumar
Posting: # 1756
Views: 26,347
 

 Sample Size Calculation (SAS)

Hi Sasikumar!

❝ Dear All,

❝ Thanks for your previous prompt answer for CV calculation!


'All' should read Helmut... ;-)

Your code is flawed; you don't have to recreate the wheel - see this post for a reference of SAS-code.

Regards, Jaime
d_labes
★★★

Berlin, Germany,
2008-04-23 13:54
(5819 d 00:19 ago)

@ sasikumar
Posting: # 1793
Views: 28,613
 

 Sample Size Calculation

Dear Sasikumar,

as always with "The power to know" nobody knows exactly what to code. :-D
After fiddling a little bit with the new experimental (in SAS 9.1) PROC POWER I came up with the code

proc power;
  Pairedmeans
  test  = Equiv_ratio
  dist  = lognormal
  CV    = 0.05 0.075 0.1 0.125 0.15 0.175 0.2 0.225 0.25 0.275 0.3
  meanratio = 0.85 0.9 0.95 1 1.05 1.1 1.15 1.2
  lower = 0.8
  upper = 1.25
  alpha = 0.05
  power = 0.8
  npairs= .
  corr  = 0.0
  ;
run;


With that code you can reproduce the block for power = 80% in
Diletti et.al., "Sample size determination for bioequivalence assessment ..."
Int. J. Clin. Pharm. Ther. Tox., Vol.30 Suppl. No.1, pp S51-58, 1992
Table 1 for multiplicative model.
With some minor deviations for CV=5% and 7.5%.

Note that the CV has to given as ratio, not percent.

Note further that uneven npairs have to rounded to even numbers to get a sequence balanced TR/RT design.

Regards,

Detlew
balakotu
★    

India,
2009-09-07 09:51
(5317 d 04:23 ago)

@ d_labes
Posting: # 4155
Views: 25,361
 

 Sample Size Calculation

proc power;

...

run;


From the above code is calculating for sample size is it ok but my doubt it is only for cross over study or else parallel, crossover, replicate and reference partial. how it will execute above program.

Suppose our study is parallel wt modification i am doing in that program crossover ?
replicate ?
reference partial ?

could u suggest me soon...


Edit: Full quote removed. Please delete anything from the text of the original poster which is not necessary in understanding your answer; see also this post! [Helmut]
yuvrajkatkar
★    

Pune, Maharashtra (India),
2009-09-19 11:24
(5305 d 02:49 ago)

@ d_labes
Posting: # 4220
Views: 25,080
 

 Sample Size Calculation

If we have 90% CI, T/R ratio and Number of subjects.

Then how to calculate Intrasubject Variability for BE study,

Kindly suggest me.

Best Regards,
Yuvraj
Helmut
★★★
avatar
Homepage
Vienna, Austria,
2009-09-19 13:48
(5305 d 00:26 ago)

@ yuvrajkatkar
Posting: # 4222
Views: 25,101
 

 Paper, pencil, brain ;-)

Hey Yuvraj,
come on, according to your profile you are the statistician of us two!

Look at the formula for the CI – and fire up algebra. You need wetware – not software. Should take you less than two minutes to come up with a solution suitable for a pocket calculator. In the future, please search the forum before posting (we had this topic several times, e.g., in this thread). If you are too lazy for this little exercise in maths (which I don’t hope), the entire stuff is given in one of my lectures (slides 12-15).

Dif-tor heh smusma 🖖🏼 Довге життя Україна! [image]
Helmut Schütz
[image]

The quality of responses received is directly proportional to the quality of the question asked. 🚮
Science Quotes
yuvrajkatkar
★    

Pune, Maharashtra (India),
2009-09-21 17:10
(5302 d 21:04 ago)

@ Helmut
Posting: # 4224
Views: 24,824
 

 Paper, pencil, brain ;-)

Dear Sir,

Suppose Geometric Least Square Mean Ratio (T/R)=1.20
Lower Confidence Limit=1.08
Upper Confidence Limit=1.33
Number of Subjects (N)=42
Degrees of Freedom=N-2=40;

TINV(.10,40)=1.683851

Based on Lower Confidence Limit
Residual SUMSQ(1.08,1.20)=2.6064
MSresidual=2.6064/40=.06516
and SEdifference=sqrt(2*MSresidual/42)=0.055703296
CVintra=100*SQRT(EXP(MSresidual)-1)=26%

Based on Upper Confidence Limit
Residual SUMSQ(1.33,1.20)=3.2089
MSresidual=3.2089/40=0.0802225
and SEdifference=sqrt(2*MSresidual/42)=0.061807112
CVintra=100*SQRT(EXP(MSresidual)-1)=29%

I want to confirm,
Whether I am right or wrong?

I need your reply.

Best Regards,
Yuvraj
Helmut
★★★
avatar
Homepage
Vienna, Austria,
2009-09-21 17:23
(5302 d 20:50 ago)

@ yuvrajkatkar
Posting: # 4225
Views: 24,842
 

 Paper, pencil, brain ;-)

Dear Yuvraj,

why don’t you verify it yourself? Calculate the CI by the standard formula (T–R difference in log-scale, new MSE) and check whether the CI agrees with the original one.

❝ I need your reply.


Pay me. ;-)

Dif-tor heh smusma 🖖🏼 Довге життя Україна! [image]
Helmut Schütz
[image]

The quality of responses received is directly proportional to the quality of the question asked. 🚮
Science Quotes
Helmut
★★★
avatar
Homepage
Vienna, Austria,
2009-09-21 20:33
(5302 d 17:40 ago)

@ yuvrajkatkar
Posting: # 4226
Views: 24,885
 

 Paper, pencil, brain ;-)

Dear Yuvraj!

❝ Suppose Geometric Least Square Mean Ratio (T/R)=1.20

❝ Lower Confidence Limit=1.08

❝ Upper Confidence Limit=1.33

❝ Number of Subjects (N)=42

❝ Degrees of Freedom=N-2=40;

❝ TINV(.10,40)=1.683851


So far, so good.

❝ Based on Lower Confidence Limit

CVintra=100*SQRT(EXP(MSresidual)-1)=26%

❝ Based on Upper Confidence Limit

CVintra=100*SQRT(EXP(MSresidual)-1)=29%


I can’t follow you. Which formula were you using? :confused:
I got:
MSE based on lower CI and PE: 0.0430666 (CV 21.0%)
MSE based on upper CI and PE: 0.0410446 (CV 20.5%)

Recalculating the CI from the estimated MSEs and the reported PE of 1.20 I got
CI based on lower: 1.06 – 1.36, and
CI based on upper: 1.07 – 1.35,
which is pretty close to the original 1.08 – 1.33…

The actual CVintra in the study likely was <20.5%, since the reported CI was tighter than both estimates. This discrepancy is due to the limited significant digits of the reported CI and PE. However, since the estimate is conservative you are on the safe side.

❝ I want to confirm,

❝ Whether I am right or wrong?


Probably wrong.

Dif-tor heh smusma 🖖🏼 Довге життя Україна! [image]
Helmut Schütz
[image]

The quality of responses received is directly proportional to the quality of the question asked. 🚮
Science Quotes
yuvrajkatkar
★    

Pune, Maharashtra (India),
2009-09-22 18:09
(5301 d 20:05 ago)

@ Helmut
Posting: # 4229
Views: 24,858
 

 Paper, pencil, brain ;-)

Dear Sir,

As per your lecture "Statistical design and analysis II"
n1=21,n2=21
PE=sqrt(1.08*1.33)=1.20
delta CL=lnCLhi-lnPE=ln(1.33)-ln(1.20)=0.10408911
alpha=0.05
t1-2*alpha,n1+n2-2=1.68385101

MSE=2*[deltaCL/(sqrt((1/n1)+(1/n2))*t1-2*alpha,n1+n2-2)]^2
   =0.080245847


SEdifference=sqrt(2*MSE/42)=0.061816105

CVintra=100*sqrt(exp(MSE)-1)
       =100*sqrt(exp(0.080245847)-1)
       =28.9%
which is nearly equal to 29%

90% CI for Upper limit
=EXP(ln(T/R)+1.68385101*SEdifference)
                       =EXP(0.181035485+1.68385101*0.061816105)
                       =1.329927721
which is nearly equal to 1.33

90% CI for Lower limit
=EXP(ln(T/R)-1.68385101*SEdifference)
                       =EXP(0.181035485-1.68385101*0.061816105)
                       =1.07998416
which is nearly equal to 1.08

Is it right, Sir?


Edit: Reformatted using BBCodes. [Helmut]

Best Regards,
Yuvraj
Helmut
★★★
avatar
Homepage
Vienna, Austria,
2009-09-22 20:22
(5301 d 17:51 ago)

@ yuvrajkatkar
Posting: # 4231
Views: 26,339
 

 No paper, pencil, brain :-(

Dear Yuvraj!

❝ 90% CI for Upper limit=1.329927721 which is nearly equal to 1.33 [image]

❝ 90% CI for Lower limit=1.07998416 which is nearly equal to 1.08 [image]


❝ Is it right, Sir?


Oops, you got me! :ok:
You are rightand I am wrong.
If I use values with no rounding I get exactly 1.08 and 1.33 up to the numeric precision of my machine.
Lesion learned: Never trust in an old fart with a pocket calculator too lazy to fire up some statistical software.
Terribly sorry for the confusion…

Dif-tor heh smusma 🖖🏼 Довге життя Україна! [image]
Helmut Schütz
[image]

The quality of responses received is directly proportional to the quality of the question asked. 🚮
Science Quotes
yuvrajkatkar
★    

Pune, Maharashtra (India),
2009-09-23 09:27
(5301 d 04:47 ago)

@ Helmut
Posting: # 4232
Views: 24,843
 

 about your lectures

Dear Sir,

I am really very happy about your lectures.

You are really Great Sir.

Sir, I want your suggestion, how to improve my knowledge and concentration?

I am really very lazy.

Best Regards,
Yuvraj
Helmut
★★★
avatar
Homepage
Vienna, Austria,
2009-09-23 15:50
(5300 d 22:24 ago)

@ yuvrajkatkar
Posting: # 4238
Views: 24,999
 

 About Trust

Dear Yuvraj!

❝ I am really very happy about your lectures.


THX, but remember these statements about ‘trust’:
  • Jaime: Never trust in any piece of software you haven’t written yourself (and even then you should be cautious…)
  • Helmut: Have fun, and don’t trust in commercial software!
  • ElMaestro: It never hurts to have an SOP.
  • Martin: never never never never use excel for any statistical calculations … and a short time later …
  • Martin: Never never never never use Excel. Not even for calculation of arithmetic means.
  • D Labes: Never, never, never use any software! Never, never, never trust any computer!
  • D Labes:
    • Do not use any software without full documentation of the implemented algorithms.
    • Do not use any software without knowing what input is desired.
    • Do not use any software without recalculation of some known test data (validation).
    • Do not use the “Power to know”. Especially if you don’t know. Or have the power :-P. (This is not to insult or bother someone, but it is sometimes really hard to guess what SAS syntax really means and to bring SAS code to produce that results you need!
  • Ohlbe: Though inspectors are paranoiacs and won’t trust anything unless it is written, an inspection remains a confidence-building process. If somebody cheats, the inspectors will just become even more paranoid, and they may just decide that they can’t trust your documents and data, even if this was just for a totally minor and insignificant detail.
  • Helmut: Never trust in an old fart with a pocket calculator too lazy to fire up some statistical software.

❝ Sir, I want your suggestion, how to improve my knowledge…

  1. Read,
  2. read,
  3. read. :-D

❝ … and concentration?


योग? Study an instrument? Chess, Go? Tightrope walking, freeclimbing?

I am really very lazy.


Too bad, indeed!

Genius is one per cent inspiration and ninety-nine per cent perspiration. Accordingly, a ‘genius’ is often merely a talented person who has done all of his or her homework. (Thomas Alva Edison)


Dif-tor heh smusma 🖖🏼 Довге життя Україна! [image]
Helmut Schütz
[image]

The quality of responses received is directly proportional to the quality of the question asked. 🚮
Science Quotes
yuvrajkatkar
★    

Pune, Maharashtra (India),
2009-10-01 15:33
(5292 d 22:40 ago)

@ Helmut
Posting: # 4284
Views: 24,642
 

 sample size calculation

Dear Sir,

I have read your Lecture notes regarding Sample size calculation for Intrasubject variability.

but when we have information about Point Estimate, Intersubject variability and Power then how to calculate sample size?

Please suggest me.

Best Regards,
Yuvraj
Helmut
★★★
avatar
Homepage
Vienna, Austria,
2009-10-01 15:52
(5292 d 22:22 ago)

@ yuvrajkatkar
Posting: # 4285
Views: 24,803
 

 inter- / intra- / total variance

Dear Yuvraj!

❝ […] but when we have information about Point Estimate, Intersubject variability and Power then how to calculate sample size?


Is it possible that you are mixing up terms (see this post)? If you have data from a parallel study, you have the total (or pooled) variance. You may split the total variance into inter- (between) and intra- (within) subject variance only in a cross-over study. So there are some possibilities:
  • You mixed up terms (have the total variability) and want to plan another parallel study. Fine, you may use software or approximations.
  • You have total variability from a parallel design and want to plan a cross-over. No way. OK, you may do that, but most likely much too many subjects will be included. That’s not ethical.
  • You have inter-subject from a cross-over. Just look up the report for intra.
I’m not sure what you mean by:

❝ we have information about […] Power


You set power to an arbitrary value in sample size estimation. Power = 1–β, where β (or error type II) is the producer’s risk of missing demonstration of BE in a given study for a product which actually is bioequivalent. This risk is generally set to 10–20% (power 80–90%).

Dif-tor heh smusma 🖖🏼 Довге життя Україна! [image]
Helmut Schütz
[image]

The quality of responses received is directly proportional to the quality of the question asked. 🚮
Science Quotes
yuvrajkatkar
★    

Pune, Maharashtra (India),
2009-10-01 19:13
(5292 d 19:01 ago)

@ Helmut
Posting: # 4286
Views: 24,710
 

 inter- / intra- / total variance

Dear Sir,

I have read the sample size calculation formula for parallel design.

I have one query regarding parameter Theta

Theta=(muT-muR)/muR

is it a T/R ratio ?

I need your guidance.

Best Regards,
Yuvraj
Helmut
★★★
avatar
Homepage
Vienna, Austria,
2009-10-01 19:30
(5292 d 18:43 ago)

@ yuvrajkatkar
Posting: # 4287
Views: 24,878
 

 Theta?!

Dear Yuvraj!

❝ I have read the sample size calculation formula for parallel design.


Which one? Can you come up with a reference?

❝ I have one query regarding parameter Theta


Theta (θ) commonly refers to the regulatory ‘goalposts’ or acceptance limits. For an acceptable difference (Δ) of 0.2 (or 20%) in the multiplicative model we get:

θ1 = 1–Δ (80%), and
θ2 = 1/(1+Δ) = 1/θ1 (125%).
In the logarithmic domain the acceptance range is symmetric around zero, since
ln1) = –0.2231 and
ln2) = +0.2231.

In the linear model (untransformed data):

θ1 = 1 – Δ (80%), and
θ2 = 1 + Δ (120%).


Theta=(muT-muR)/muR

❝ is it a T/R ratio ?


No, this is the difference normalized to the reference. :-D
T =  95, R = 100 ⇒ –0.05 (ratio 0.95)
T = 190, R = 200 ⇒ –0.05 (ratio 0.95)

Dif-tor heh smusma 🖖🏼 Довге життя Україна! [image]
Helmut Schütz
[image]

The quality of responses received is directly proportional to the quality of the question asked. 🚮
Science Quotes
yuvrajkatkar
★    

Pune, Maharashtra (India),
2009-10-03 09:44
(5291 d 04:29 ago)

@ Helmut
Posting: # 4289
Views: 25,204
 

 sample size for parallel design

Dear Sir,

Thanks a lot, Sir.

Ok Please see the Chow and Liu Sample size formula for parallel design

Suppose CV=.15
Assume n=32
n            32         32         32
alpha        0.05       0.05       0.05
beta         0.2        0.2        0.2
power        0.8        0.8        0.8
Theta        0.95       1          1.05
LN(Theta)2  -0.10259    0          0.09758
CV           0.15       0.15       0.15
CV^2         0.0225     0.0225     0.0225
talpha,2n-2  1.998971   1.998971   1.998971
tbeta,2n-2   1.669804   1.669804   1.669804

       2CV^2 (talpha,2n-2+tbeta/2, 2n-2)^2
  n >= -----------------------------------
                 0.2-|Theta|^2

Using this formula, I have got n= 2.001728, 3.028481, 5.913866

and using the below SAS code

proc power;
  Pairedmeans
  test  = Equiv_ratio
  dist  = lognormal
  CV    = 0.15
  meanratio = 0.95 1 1.05
  lower = 0.8
  upper = 1.25
  alpha = 0.05
  power = 0.8
  npairs= .
  corr  = 0.0
  ;
run;

I have got n= 12, 10, 11 per group
It means n=24, 20, 22 for parallel design

Which one is the right answer?


Edit: Reformated using BBCode (code); tabs substituted by blanks. Please see the Policy. [Helmut]

Best Regards,
Yuvraj
Helmut
★★★
avatar
Homepage
Vienna, Austria,
2009-10-03 15:46
(5290 d 22:28 ago)

@ yuvrajkatkar
Posting: # 4290
Views: 24,432
 

 Reference?

Dear Yuvraj,

❝ Please see the Chow and Liu Sample size formula for parallel design


Chow and Liu have published a lot; most of it useful, but sometimes doubtful. When I asked for a reference can you please come up with a complete one (authors, title, journal, page, year; if a book: authors, title, publisher, place, year). I'm not in the mood for searching. THX.

I'm not gifted with

[image]

but "Pairedmeans" for a parallel design?

Dif-tor heh smusma 🖖🏼 Довге життя Україна! [image]
Helmut Schütz
[image]

The quality of responses received is directly proportional to the quality of the question asked. 🚮
Science Quotes
yuvrajkatkar
★    

Pune, Maharashtra (India),
2009-10-09 18:46
(5284 d 19:27 ago)

@ Helmut
Posting: # 4336
Views: 24,965
 

 MSE obtain from Parallel study in WinNonlin

Dear Sir,


MSE obtained from parallel study is pooled MSE.
means Intra + Inter subject residual variance.
Then can we use same formula of Intra-subject CV.

CVintra=100*sqrt(exp(MSE)-1)

where MSE=Intra + Inter subject residual variance. (i.e just one value obtained from WinNonlin (Final variance parameter workbook).

Is it right, Sir?

Best Regards,
Yuvraj
Helmut
★★★
avatar
Homepage
Vienna, Austria,
2009-10-10 12:51
(5284 d 01:23 ago)

@ yuvrajkatkar
Posting: # 4338
Views: 24,444
 

 Parallel study in WinNonlin

Dear Yuvraj!

❝ MSE obtained from parallel study is pooled MSE.

❝ means Intra + Inter subject residual variance.

❝ […] one value obtained from WinNonlin (Final variance parameter workbook).

❝ Is it right, Sir?


You are right about the pooled variance and the formula.
But WinNonlin's method (assuming equal variances) is flawed – even in the recent version of Phoenix/WinNonlin 6.0. For details see this thread.
FDA mandates a t-test corrected for unequal variances in their guideline. Although the conventional t-test is quite robust against violations of this assumption, it is sensitive if the dataset is imbalanced (which is regularly the case in parallel studies). Applying the wrong test will be anticonservative, i.e., the patient’s risk is inflated to an unknown degree. For an extreme example see one of my lectures (slides 65-68).

Dif-tor heh smusma 🖖🏼 Довге життя Україна! [image]
Helmut Schütz
[image]

The quality of responses received is directly proportional to the quality of the question asked. 🚮
Science Quotes
UA Flag
Activity
 Admin contact
22,957 posts in 4,819 threads, 1,636 registered users;
100 visitors (0 registered, 100 guests [including 7 identified bots]).
Forum time: 13:14 CET (Europe/Vienna)

With four parameters I can fit an elephant,
and with five I can make him wiggle his trunk.    John von Neumann

The Bioequivalence and Bioavailability Forum is hosted by
BEBAC Ing. Helmut Schütz
HTML5