bvoggu ☆ 2010-08-18 09:49 (5373 d 12:18 ago) Posting: # 5801 Views: 10,469 |
|
Dear all My name is Bharat kumar (Trainee in pharmacokinetics dept.) In our company, calculations of least square mean were done according to SAS only. But i want to learn all those manually in excel. Up to my knowledge... LSM will be calculated by doing average of parameter of one treatment in period 1 and average of same in period 2, followed by dividing the sum of both averages by 2 (2 in case of two periods, right?). My questions are:
— Regards, Bharat |
Helmut ★★★ ![]() ![]() Vienna, Austria, 2010-08-18 16:15 (5373 d 05:52 ago) @ bvoggu Posting: # 5803 Views: 9,475 |
|
Dear Bharat, please search the forum before posting. What about this thread (and linked examples)? ❝ 1. While doing calculations with same formula, i am getting correct values for AUCt, Cmax but for AUCinf i am getting different values. This is strange. Are you sure that you have complete data for AUCinf? Maybe you have complete datasets for AUCt, Cmax and are calculating geometric means instead of adjusted (=LSM) means in all cases. Remember that simple mean = adjusted mean only for complete (balanced) datasets. Please check. ❝ 3. Please suggest me a book especially for statistical part of PK? See this post. Newer editions of some textbooks are published as of today. — Dif-tor heh smusma 🖖🏼 Довге життя Україна! ![]() Helmut Schütz ![]() The quality of responses received is directly proportional to the quality of the question asked. 🚮 Science Quotes |
bvoggu ☆ 2010-08-19 11:24 (5372 d 10:43 ago) (edited on 2010-08-20 07:58) @ Helmut Posting: # 5806 Views: 9,758 |
|
Dear Helmut, Thank you very much for immediate response I did calculation for least square mean of test and reference product in a 2X2 cross over study (TR Vs RT), but i am getting correct values for Cmax and AUCt only, but not for AUCinf. Please check with the following data if possible...
SubID Period Treatment Sequence AUCt AUCinf Calculation according to mine is AUCt-LSM 8.919 (T), 8.927 (R) Calculation according to SAS default programme for AUCt-LSM 8.919 (T), 8.927(R) But for AUCinf my results are-8.929 (R) and 8.974 (T) But SAS programme results are-8.942 (R) and 8.936 (T) I am not getting why these are different ![]() excuse me for such a lengthy data.... Please clarify me that a balanced design is nothing but number of sub facing TR is equal to number of sub facing RT right? what is the formula for calculation of standard error of difference? I am getting these difference bcz of excel, Please clarify SAS and Excel results are different to some extent right? and please provide me calculation upto LSM with one of our's members formula (mean_seq1+mean_seq2)/2 for balanced design or (mean_seq1*n1)+(mean_seq2*n2)}/(n1+n2) for unbalanced design (I thought that second formula is best because our data is unbalanced). But I am getting result only with first formula not with second. Please clarify this. — Regards, Bharat |
Helmut ★★★ ![]() ![]() Vienna, Austria, 2010-08-19 14:36 (5372 d 07:31 ago) @ bvoggu Posting: # 5809 Views: 9,335 |
|
Dear Bharat, please add a column with the subject's ID. Edit your original post instead of posting a new one. THX. ❝ Please clarify me that a balanced design is nothing but number of sub facing TR is equal to number of sub facing RT right? Yes. ❝ what is the formula for calculation of standard error of difference? SE(T-R)=sqrt[2×MSEresidual/(n1+n2)] , where n1 and n2 are the numbers of subjects in sequences 1 and 2.Edit: I played around with your dataset. I coded the subjects ID to 1-9, 1-9, 10-16, 10-16. I don't have SAS, but in Phoenix/WinNonlin v6.1 I could confirm SAS's results, both for AUCt and AUCinf. Interestingly I got for SE(T-R): PHX 'manual' Can one of our SAS-owners please check these results? Maybe my formula is wrong. — Dif-tor heh smusma 🖖🏼 Довге життя Україна! ![]() Helmut Schütz ![]() The quality of responses received is directly proportional to the quality of the question asked. 🚮 Science Quotes |
d_labes ★★★ Berlin, Germany, 2010-08-19 18:18 (5372 d 03:49 ago) @ Helmut Posting: # 5811 Views: 9,319 |
|
Dear Helmut, dear Bharat, ❝ Edit: I played around with your dataset. I coded the subjects ID to 1-9, ❝ 1-9, 10-16, 10-16. I don't have SAS, but in Phoenix/WinNonlin v6.1 I could ❝ confirm SAS's results, both for AUCt and AUCinf. ❝ Interestingly I got for SE(T-R): ❝ ❝ ❝ ❝ Can one of our SAS-owners please check these results? Of course I will do you the favor. PHX 'manual' "The power to know" ❝ Maybe my formula is wrong. Seems so ![]() Try the following: SE(T-R)=sqrt(0.5*MSEresidual*(1/n1+1/n2)) .Bahrat! Have a look at ElMaestros first sentence! Eventually that is your problem. BTW: My SAS LSMeans are equal to Bahrats SAS LSMeans ![]() ![]() — Regards, Detlew |
Helmut ★★★ ![]() ![]() Vienna, Austria, 2010-08-19 18:33 (5372 d 03:34 ago) @ d_labes Posting: # 5812 Views: 9,256 |
|
Dear D. Labes! ❝ ❝ Maybe my formula is wrong. ❝ ❝ Seems so ❝ Try the following: ❝ THX, my manual doesn't give the formula at all and I was to lazy to look it up somewhere else. So I improvised... ![]() — Dif-tor heh smusma 🖖🏼 Довге життя Україна! ![]() Helmut Schütz ![]() The quality of responses received is directly proportional to the quality of the question asked. 🚮 Science Quotes |
bvoggu ☆ 2010-08-20 12:51 (5371 d 09:16 ago) @ d_labes Posting: # 5817 Views: 9,154 |
|
❝ ❝ Hello Mr. Labes I am very thankful for your response and may I know how to calculate MSE residuals here??? — Regards, Bharat |
d_labes ★★★ Berlin, Germany, 2010-08-20 16:57 (5371 d 05:10 ago) @ bvoggu Posting: # 5819 Views: 9,181 |
|
Dear Bharat, ❝ ... may I know how to calculate MSE residuals here??? MSEresidual is the Mean square of the error term from an appropriate ANOVA with the terms (effects) treatment, period, sequence and subject within sequence in the ANOVA model. Although it is in principle possible I would not recommend to do this in M$ EXCEL ![]() If you need a cheaper alternative then ![]() If you insist in using a spreadsheet consider the evaluation via intra-subject contrasts T-R. See Senn, Chapter 3 or Chow and Liu, Chapter 3.3. S Senn Cross-over Trials in Clinical Research John Wiley & Sons, Chichester (2nd ed. 2002) S-C Chow and J-p Liu Design and Analysis of Bioavailability and Bioequivalence Studies Marcel Dekker, New York (3rd ed. 2009) — Regards, Detlew |
ElMaestro ★★★ Denmark, 2010-08-18 16:46 (5373 d 05:21 ago) @ bvoggu Posting: # 5804 Views: 9,589 |
|
Dear Bharat, ❝ Up to my knowledge... LSM will be calculated by doing average of parameter of one treatment in period 1 and average of same in period 2, followed by dividing the sum of both averages by 2 (2 in case of two periods, right?). In the simplest case, average the sequences rather than the periods. If you are looking for a sneakier way of finding the values, then you need to extract the treatment effects from the fitted effect vector (often called greek beta). — Pass or fail! ElMaestro |
bvoggu ☆ 2010-08-20 09:41 (5371 d 12:26 ago) @ ElMaestro Posting: # 5814 Views: 9,245 |
|
❝ If you are looking for a sneakier way of finding the values, then you need to extract the treatment effects from the fitted effect vector (often called greek beta). Hi Mr.Gent I didn't get you about sneakier way of finding. Because I am a beginner please clarify clearly... In my data I am calculating the least square mean of reference and treatment separately. In my opinion you are telling about overall least square mean, right?. — Regards, Bharat |
ElMaestro ★★★ Denmark, 2010-08-20 11:34 (5371 d 10:33 ago) @ bvoggu Posting: # 5815 Views: 9,199 |
|
Dear Bharat, ❝ I didn't get you about sneakier way of finding. Because I am a beginner please clarify clearly... Sorry if I was not expressing myself in a clear fashion. The normal linear model, written in matrix notation would look like this: y=Xb+e y is the vector of abserved values (log Cmax for example). X is model matrix. b is the coefficient vector. e is the vector containg the residuals. If you have software that fits this model, then it minimses ete (the sum of squares) by playing around with the values in the b vector. By laws of matrix logic, b has as many rows as X has columns, and that is one for each value to be fitted. From this you can extract values (LSMeans) for Test and Reference. Note that when a model with intercept is fitted, there is typically just one column in X that corresponds to an LSMean value; to find the other in such cases you will have to add and subtract a little in order to figger the other LSMean out. Oh dear, this was not at all clear. Sorry. — Pass or fail! ElMaestro |