bear v1.0.0 - a data analytical tool for ABE in R [🇷 for BE/BA]
Dear EM,
Thanks for your comments. We went back to test glm in bear again. And find that you're correct about glm. Basically, both lm and glm generate the same results with the tested dataset. The following are the Type I SS and Type III SS obtained from lm and glm.
lm - Type I SS
lm - Type III SS
glm - Type I SS
glm - Type III SS
Look like that only AICs are different when comparing these two methods.
Since SAS does not calculate AICs in its output, we thus cannot compare which one is correct. The reason we chose lm, instead of glm, might be that the output generated by lm is more like to that of SAS. And we didn't quite understand what "Deviance Resid." (in glm output) meant at beginning.
Again, both glm and lm generate almost the same results.
Thanks for your comments. We went back to test glm in bear again. And find that you're correct about glm. Basically, both lm and glm generate the same results with the tested dataset. The following are the Type I SS and Type III SS obtained from lm and glm.
lm - Type I SS
glmData <-lm(Cmax ~ sequence+ period + drug +subject, data=KK)
anova(glmData)
Analysis of Variance Table
Response: Cmax
Df Sum Sq Mean Sq F value Pr(>F)
sequence 1 585 585 0.0160 0.9014
period 1 63175 63175 1.7293 0.2131
drug 1 58149 58149 1.5917 0.2311
subject 12 634325 52860 1.4469 0.2660
Residuals 12 438395 36533
lm - Type III SS
drop1(glmData, test="F")
Single term deletions
Model:
Cmax ~ sequence + period + drug + subject
Df Sum of Sq RSS AIC F value Pr(F)
<none> 438395 302
sequence 0 -4.657e-10 438395 302
period 1 63175 501570 304 1.7293 0.2131
drug 1 58149 496544 304 1.5917 0.2311
subject 12 634325 1072719 303 1.4469 0.2660
glm - Type I SS
glmData <-glm(Cmax ~ sequence+ period + drug +subject, data=KK)
anova(glmData)
Analysis of Deviance Table
Model: gaussian, link: identity
Response: Cmax
Terms added sequentially (first to last)
Df Deviance Resid. Df Resid. Dev
NULL 27 1194629
sequence 1 585 26 1194044
period 1 63175 25 1130869
drug 1 58149 24 1072719
subject 12 634325 12 438395
glm - Type III SS
drop1(glmData, test="F")
Single term deletions
Model:
Cmax ~ sequence + period + drug + subject
Df Deviance AIC F value Pr(F)
<none> 438395 384
sequence 0 438395 384
period 1 501570 386 1.7293 0.2131
drug 1 496544 385 1.5917 0.2311
subject 12 1072719 385 1.4469 0.2660
Look like that only AICs are different when comparing these two methods.
Since SAS does not calculate AICs in its output, we thus cannot compare which one is correct. The reason we chose lm, instead of glm, might be that the output generated by lm is more like to that of SAS. And we didn't quite understand what "Deviance Resid." (in glm output) meant at beginning.
Again, both glm and lm generate almost the same results.
—
All the best,
-- Yung-jin Lee
bear v2.9.1:- created by Hsin-ya Lee & Yung-jin Lee
Kaohsiung, Taiwan https://www.pkpd168.com/bear
Download link (updated) -> here
All the best,
-- Yung-jin Lee
bear v2.9.1:- created by Hsin-ya Lee & Yung-jin Lee
Kaohsiung, Taiwan https://www.pkpd168.com/bear
Download link (updated) -> here
Thread locked
Complete thread:
- bear v1.0.0 - a data analytical tool for ABE in R yjlee168 2008-07-12 20:53 [🇷 for BE/BA]
- bear v1.0.0 for R - first impressions Helmut 2008-07-14 04:12
- bear v1.0.0 for R - first impressions yjlee168 2008-07-14 10:26
- bear v1.0.0 for R - first impressions Helmut 2008-07-14 14:02
- bear v1.0.0 for R - first impressions yjlee168 2008-07-14 18:12
- bear v1.0.0 for R... Helmut 2008-07-14 18:56
- bear v1.0.0 for R... yjlee168 2008-07-14 19:30
- bear v1.0.0 for R... Helmut 2008-07-14 20:35
- bear v1.0.0 for R... yjlee168 2008-07-14 19:30
- bear v1.0.0 for R... Helmut 2008-07-14 18:56
- bear v1.0.0 for R - first impressions yjlee168 2008-07-15 09:44
- bear v1.0.0 for R - first impressions yjlee168 2008-07-14 18:12
- bear v1.0.0 for R - first impressions Helmut 2008-07-14 14:02
- bear v1.0.0 for R - first impressions yjlee168 2008-07-14 10:26
- bear v1.0.0 - a data analytical tool for ABE in R martin 2008-07-14 12:18
- bear v1.0.0 - a data analytical tool for ABE in R yjlee168 2008-07-14 19:02
- bear v1.0.0 - a data analytical tool for ABE in R Aceto81 2008-07-15 10:07
- bear v1.0.0 - a data analytical tool for ABE in R yjlee168 2008-07-16 07:22
- bear v1.0.0 - a data analytical tool for ABE in R Aceto81 2008-07-16 09:47
- bear v1.0.0 - a data analytical tool for ABE in R yjlee168 2008-07-16 21:32
- bear v1.0.0 - a data analytical tool for ABE in R Aceto81 2008-07-16 09:47
- lambda_z estimation yjlee168 2008-09-23 12:13
- lambda_z estimation d_labes 2008-09-23 14:41
- lambda_z estimation yjlee168 2008-09-24 22:41
- lambda_z estimation Aceto81 2008-09-25 10:56
- lambda_z estimation yjlee168 2008-09-25 21:00
- lambda_z estimation yjlee168 2008-09-26 08:03
- lambda_z estimation Aceto81 2008-09-26 10:25
- lambda_z estimation yjlee168 2008-09-28 00:08
- lambda_z estimation yjlee168 2008-09-29 13:32
- WinNonlin 5.2.1 vs. 6 beta Helmut 2008-09-29 15:54
- WinNonlin 5.2.1 vs. 6 beta yjlee168 2008-09-29 18:45
- WinNonlin 5.2.1 vs. 6 beta --> new finding yjlee168 2008-09-30 08:10
- Example 4 in SASophylistic d_labes 2008-09-30 09:43
- Example 4 in SASophylistic yjlee168 2008-09-30 12:23
- Example 4 in SASophylistic d_labes 2008-09-30 09:43
- WinNonlin 5.2.1 vs. 6 beta Helmut 2008-09-29 15:54
- lambda_z estimation Aceto81 2008-09-26 10:25
- TTT method for lambda_z estimation yjlee168 2008-09-30 12:34
- TTT method for lambda_z estimation d_labes 2008-09-30 14:48
- TTT method for lambda_z estimation yjlee168 2008-09-30 20:28
- TTT method plus best fit combined d_labes 2008-10-01 08:43
- AIC or ARS as the best fit criterion? yjlee168 2008-10-02 12:40
- AIC or ARS as the best fit criterion? d_labes 2008-10-02 13:59
- AIC or ARS as the best fit criterion? yjlee168 2008-10-02 12:40
- TTT method plus best fit combined d_labes 2008-10-01 08:43
- TTT method for lambda_z estimation yjlee168 2008-09-30 20:28
- TTT method for lambda_z estimation Aceto81 2008-09-30 15:11
- TTT method for lambda_z estimation yjlee168 2008-09-30 19:57
- TTT method for lambda_z estimation Aceto81 2008-10-01 14:18
- TTT method for lambda_z estimation yjlee168 2008-10-02 12:29
- TTT method for lambda_z estimation Aceto81 2008-10-03 15:33
- TTT method for lambda_z estimation yjlee168 2008-10-03 21:22
- TTT method for lambda_z estimation Aceto81 2008-10-03 15:33
- TTT method for lambda_z estimation yjlee168 2008-10-02 12:29
- TTT method for lambda_z estimation Aceto81 2008-10-01 14:18
- TTT method for lambda_z estimation yjlee168 2008-09-30 19:57
- TTT method for lambda_z estimation d_labes 2008-09-30 14:48
- lambda_z estimation d_labes 2008-09-23 14:41
- bear v1.0.0 - a data analytical tool for ABE in R yjlee168 2008-07-16 07:22
- bear v1.0.0 - a data analytical tool for ABE in R Aceto81 2008-07-15 10:07
- bear v1.0.0 - a data analytical tool for ABE in R yjlee168 2008-07-14 19:02
- bear v1.0.0 - a data analytical tool for ABE in R ElMaestro 2008-07-22 14:35
- bear v1.0.0 - a data analytical tool for ABE in R yjlee168 2008-07-23 09:55
- bear v1.0.0 - a data analytical tool for ABE in R ElMaestro 2008-07-24 10:04
- bear v1.0.0 - a data analytical tool for ABE in R yjlee168 2008-07-25 20:38
- bear v1.0.0 - a data analytical tool for ABE in R ElMaestro 2008-07-28 08:42
- bear v1.0.0 - a data analytical tool for ABE in R yjlee168 2008-07-25 20:38
- bear v1.0.0 - a data analytical tool for ABE in R ElMaestro 2008-09-23 16:10
- bear v1.0.0 - a data analytical tool for ABE in Ryjlee168 2008-09-24 22:00
- bear v1.0.0 - a data analytical tool for ABE in R ElMaestro 2008-09-25 09:03
- bear v1.0.0 - a data analytical tool for ABE in R ElMaestro 2008-09-25 13:52
- bear v1.0.0 - a data analytical tool for ABE in R Helmut 2008-09-25 14:39
- bear v1.0.0 - a data analytical tool for ABE in R ElMaestro 2008-09-25 14:55
- bear v1.0.0 - a data analytical tool for ABE in R Helmut 2008-09-25 15:33
- GLM in R and the power to know d_labes 2008-09-25 16:45
- GLM in R and the power to know ElMaestro 2008-09-25 19:23
- nesting in R? yjlee168 2008-09-25 20:49
- nesting in R? ElMaestro 2008-09-25 22:01
- lm in R Helmut 2008-09-26 00:23
- nesting in R? yjlee168 2008-09-25 20:49
- GLM in R and the power to know ElMaestro 2008-09-25 19:23
- GLM in R and the power to know d_labes 2008-09-25 16:45
- bear v1.0.0 - a data analytical tool for ABE in R Helmut 2008-09-25 15:33
- bear v1.0.0 - a data analytical tool for ABE in R ElMaestro 2008-09-25 14:55
- bear v1.0.0 - a data analytical tool for ABE in R Helmut 2008-09-25 14:39
- bear v1.0.0 - a data analytical tool for ABE in R ElMaestro 2008-09-25 13:52
- bear v1.0.0 - a data analytical tool for ABE in R ElMaestro 2008-09-25 09:03
- bear v1.0.0 - a data analytical tool for ABE in Ryjlee168 2008-09-24 22:00
- bear v1.0.0 - a data analytical tool for ABE in R ElMaestro 2008-07-24 10:04
- Type III SS in balanced, crossover BE studies? yjlee168 2008-10-18 21:03
- Type III SS in balanced, crossover BE studies? ElMaestro 2008-10-21 13:09
- Type III SS in balanced, crossover BE studies? yjlee168 2008-10-21 13:19
- Only balanced, crossover BE studies? d_labes 2008-10-21 14:31
- Only balanced, crossover BE studies? yjlee168 2008-10-21 19:01
- Only balanced, crossover BE studies? ElMaestro 2008-10-24 11:26
- Thread locked Helmut 2008-10-24 11:58
- Only balanced, crossover BE studies? ElMaestro 2008-10-24 11:26
- Only balanced, crossover BE studies? yjlee168 2008-10-21 19:01
- Only balanced, crossover BE studies? d_labes 2008-10-21 14:31
- Type III SS in balanced, crossover BE studies? yjlee168 2008-10-21 13:19
- Type III SS in balanced, crossover BE studies? ElMaestro 2008-10-21 13:09
- bear v1.0.0 - a data analytical tool for ABE in R yjlee168 2008-07-23 09:55
- bear v1.0.0 for R - first impressions Helmut 2008-07-14 04:12