gls() for unequal variances? [🇷 for BE/BA]

posted by d_labes  – Berlin, Germany, 2010-04-26 18:36 (5106 d 19:48 ago) – Posting: # 5238
Views: 55,976

Dear Helmut,

❝ ... I would go with Welch-tests, because ANOVA (or lm and lme) assume

❝ homoscedasticity.


What about:
require(nlme) # HS: added, because not loaded by default
# must use gls() because lme() does not allow for no random effect
glsModel <- gls(lnAUC0t ~ drug, weights=varIdent(form=~1|drug), data=TotalData)
summary(glsModel)


This gives (20 subjects bear data) :
Generalized least squares fit by REML
  Model: lnAUC0t ~ drug
  Data: TotalData
       AIC      BIC    logLik
  8.491722 12.05321 -0.245861

Variance function:
 Structure: Different standard deviations per stratum
 Formula: ~1 | drug
 Parameter estimates:
        1         2
1.0000000 0.4173818  (seems to give us different variances as portion of residual, hurrrrah)

Coefficients:
              Value Std.Error  t-value p-value
(Intercept) 7.10189 0.1056507 67.22045  0.0000
drug2       0.01594 0.1144841  0.13923  0.8908


But astonishing :confused::
intervals(glsModel, level=0.9)
Approximate 90% confidence intervals

 Coefficients:
                 lower    est.     upper
(Intercept)  6.9186849 7.10189 7.2850951
drug2       -0.1825826 0.01594 0.2144626

#back-transformed
T vs. R       83.31   101.61   123.92 (same as without weights or lm() :-()

Regards,

Detlew

Complete thread:

UA Flag
Activity
 Admin contact
22,987 posts in 4,824 threads, 1,664 registered users;
97 visitors (0 registered, 97 guests [including 8 identified bots]).
Forum time: 14:24 CEST (Europe/Vienna)

The only way to comprehend what mathematicians mean by Infinity
is to contemplate the extent of human stupidity.    Voltaire

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