earlybird
☆    

2010-11-24 17:34
(5266 d 11:56 ago)

Posting: # 6210
Views: 8,490
 

 Intrasubject CV from replicate design [Power / Sample Size]

Dear members,

Image you have results from literature (PE and 90% CI) from a fully replicate design (4 periods, 4 sequences). Does someone know how to calcalate intra-subject CV? For example PE = 103, CI = [93; 115]?

Regards,
Earlybird


Edit: Category changed. [Helmut]
Helmut
★★★
avatar
Homepage
Vienna, Austria,
2010-11-24 19:47
(5266 d 09:44 ago)

@ earlybird
Posting: # 6211
Views: 7,490
 

 Intrasubject CV from replicate design

Hi earlybird!

Sorry, I'm too short in time to do the algebra for you - but two hints:
  • D. Labes' post about a partial replicate.
  • Chapter 9.4.2 of Chow and Liu (2009).

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
earlybird
☆    

2010-11-25 08:58
(5265 d 20:32 ago)

@ Helmut
Posting: # 6215
Views: 7,346
 

 Intrasubject CV from replicate design

Hallo HS,


thank you for your hint! D_Labes has always good knowledge.

Well I think first I have to buy the actuall edition of the book you recomended. My version is a little bit old fashioned. In the meantime I will ask Dave Dubins how much it will cost to include a new button for that kind of question in his FARTSSIE tool.

Best regards,
earlybird
Helmut
★★★
avatar
Homepage
Vienna, Austria,
2010-11-25 14:54
(5265 d 14:37 ago)

@ earlybird
Posting: # 6226
Views: 7,367
 

 Boss button

Hi earlybird!

❝ thank you for your hint! D_Labes has always good knowledge.


You can bet on that. ;-)

❝ Well I think first I have to buy the actuall edition of the book you

❝ recomended. My version is a little bit old fashioned.


Well, it's the same chapter (9.4.2) in the previous editions: 1st ed. pp281, 2nd ed. pp285...

❝ [...] button [...] in [...] FARTSSIE tool.


Go for it. In the meantime customize your button with your boss' name (or an approprite symbol - wingdings or webdings have some 'nice' ones): In the German version of M$-Excel right-click on the 'Boss Button' > Text bearbeiten > Your boss' name N > format N as Wingdings and see what happens. :-D

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
earlybird
☆    

2010-11-26 11:20
(5264 d 18:11 ago)

@ Helmut
Posting: # 6236
Views: 7,266
 

 Boss button

Hi HS!

❝ Well, it's the same chapter (9.4.2) in the previous editions:

❝ 1st ed. pp281, 2nd ed. pp285...


OK I rename to slowlybird ;-)

❝ ❝ [...] button [...] in [...] FARTSSIE tool.


❝ Go for it. In the meantime customize your button with your boss' name (or

❝ an approprite symbol - wingdings or webdings have some 'nice' ones): In

❝ the German version of M$-Excel right-click on the 'Boss Button' > Text

bearbeiten > Your boss' name N > format N as Wingdings and see what

❝ happens. :-D


I'll keep you informed what happens ;-)
d_labes
★★★

Berlin, Germany,
2010-11-25 09:19
(5265 d 20:11 ago)

@ earlybird
Posting: # 6216
Views: 7,771
 

 Intrasubject CV from 2x4x4 replicate crossover

Dear Earlybird,

you need to know the sample size additional to the numbers given by you.

Then you can use the formula
  [L,U]=log(point)+t(1-alpha,3*N-4)*s*sqrt(1/N)
where L=log(lower) and U=log(upper) (see Chapter 9.4.2 of Chow and Liu (2009)) to obtain s by a little algebra, easy for you :cool:.
N is the total sample size and it is assumed that each sequence has the same number of subjects assigned.
If not, the square root reads sqrt(1/16*(1/n1 + 1/n2 +1/n3 +1/n4)) where the ni are the numbers of subjects assigned to the four sequences.

The degrees of freedom for the critical t-value are without carry over in the model. If your numbers are from a model with carry-over reduce them by 1.

From the obtained s you get the coefficient of variation according to the well known formula
  CV=sqrt(exp(s2)-1)*100   (in %)

Hope this helps.

Regards,

Detlew
earlybird
☆    

2010-11-25 12:08
(5265 d 17:22 ago)

@ d_labes
Posting: # 6222
Views: 7,597
 

 Intrasubject CV from 2x4x4 replicate crossover

Dear d_labes,

thank you it helps a lot!

I am doing the programming now with Excel as I am not familiar with R and I am not as quick as you. What CV do you get it you assume a 4x4x4 replicate, and sample size of 24 subjects?

Best regards,
earlybird
d_labes
★★★

Berlin, Germany,
2010-11-25 11:11
(5265 d 18:20 ago)

@ earlybird
Posting: # 6218
Views: 7,503
 

 Intrasubject CV from CI with power to R

Dear Earlybird, dear All,

for those who have access to R and have installed the package PowerTOST here an add-on function:
require(PowerTOST)
CVfromCI <- function(point,lower,upper,n,design="2x2",alpha=0.05)
{
  if (missing(lower) | missing(upper)) stop("Lower and upper CL must be given!")
  if (missing(n)) stop("Sample size must be given!")
 
  if (missing(point)) point <- sqrt(lower*upper)
 
  # get design characteristics
  d.no <- .design.no(design)
  if (is.na(d.no)) stop("Unknown design!")
  desi <- .design.props(d.no)
  dfe  <- parse(text=desi$df[1],srcfile=NULL) #degrees of freedom as expression

  tval <- qt(1-alpha,eval(dfe))
  s1 <- (log(point)-log(lower))/sqrt(desi$bk/n)/tval
  s2 <- (log(upper)-log(point))/sqrt(desi$bk/n)/tval
  sw <- 0.5*(s1+s2)
  # both estimates very different?
  if (abs(s1-s2)/sw>0.1) warning("sw1, sw2 very different. Check input.")
  return(se2CV(sw))
}


With this function you can obtain the CV from each design :cool: known within PowerTOST.
This function will be included in the next release of PowerTOST if the author of that package will accept the code :-D. Any enhancement or comment welcome.

Taking the numbers from the first post in this thread and assuming 24 subjects one gets:
CVfromCI(point=1.03,lower=0.93,upper=1.15,n=24,design="2x4x4")
[1] 0.3196356

i.e. CV=32%.

Regards,

Detlew
Helmut
★★★
avatar
Homepage
Vienna, Austria,
2010-11-25 15:08
(5265 d 14:23 ago)

@ d_labes
Posting: # 6227
Views: 7,366
 

 Bravo!

Dear D. Labes!

❝ Any enhancement or comment welcome.


Very nice code!

<nitpicking>

Only a comment concerning the package's documentation: S.A. Joulious :cool:

</nitpicking>

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
d_labes
★★★

Berlin, Germany,
2010-11-25 15:47
(5265 d 13:43 ago)

@ Helmut
Posting: # 6229
Views: 7,323
 

 Bravo ... oh!

Dear Helmut,

❝ <nitpicking>

   Only a comment concerning the package's documentation:

   S.A. Joulious :cool:

❝ </nitpicking>


seems I suffer from too many ooooh's. And this in the name of Sancta Julius!
Let's see if this damned bug has vanished at each place it occures til version 12.0-1 :-D.

Regards,

Detlew
Helmut
★★★
avatar
Homepage
Vienna, Austria,
2010-12-23 04:42
(5238 d 00:48 ago)

@ d_labes
Posting: # 6335
Views: 7,081
 

 PowerTOST for R

Dear D. Labes,

this post made me suspicious.
Ah, see 0.7-3 => 0.8-1! Nice!

❝ seems I suffer from too many ooooh's.


At least you made it in the HTML-help; the PDF is still over-oooohed.

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
23,424 posts in 4,927 threads, 1,669 registered users;
38 visitors (0 registered, 38 guests [including 9 identified bots]).
Forum time: 06:31 CEST (Europe/Vienna)

A drug is that substance which, when injected into a rat,
will produce a scientific report.    Anonymous

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