R code for lm.mod does not make sense [🇷 for BE/BA]

posted by dmfisher – USA, 2015-06-09 05:55 (3664 d 04:33 ago) – Posting: # 14930
Views: 52,598

(edited on 2015-06-09 07:46)

The R code for lm.mod is (obtained by typing lm.mod at a prompt):

    cat("\n")
    target.lm <- lm(target ~ seq + subj:seq + prd + drug, data = inputdata)
    BearAnova = anova(target.lm)
    row.names(BearAnova)[4] = "subj(seq)"
    show(BearAnova[2:5, ])
    cat("\n")
    colnames(BearAnova) <- c(" DF", "   Type I SS", " Mean Square",
        " F Value", " Pr > F")
    show(BearAnova[2:4, ])
    cat("\n")
    colnames(BearAnova) <- c(" DF", " Type III SS", " Mean Square",
        " F Value", " Pr > F")
    show(BearAnova[2:4, ])
    cat("-----------------------------------------------------------\n")
    cat("\n")
    cat("Tests of Hypothesis using the Type I MS for \n")
    cat("SUBJECT(SEQUENCE) as an error term\n\n")
    show(summary(aov(target ~ seq, data = inputdata)))
    cat("\n")
    cat("Tests of Hypothesis using the Type III MS for\n")
    cat("SUBJECT(SEQUENCE) as an error term\n\n")
    show(summary(aov(target ~ seq, data = inputdata)))
    cat("---\n")
    cat("Sum Sq. = Type III SS\n\n")
    cat(" Tests for carryover effects and direct formulation effects\n")
    cat("------------------------------------------------------------")
    show(summary(aov(target ~ seq * drug + Error(subj), data = inputdata)))
    cat("------------------------------------------------------------\n")


There are several instances of
     show(BearAnova ...)
The column names are changed between these commands but the contents of the object are unchanged. This makes no sense — how could the values be the same for Type I and Type III SS?


Edit: category changed [Ohlbe]
Edit: Please follow the Forum’s Policy. [Helmut]

Complete thread:

UA Flag
Activity
 Admin contact
23,424 posts in 4,927 threads, 1,676 registered users;
45 visitors (0 registered, 45 guests [including 9 identified bots]).
Forum time: 10:28 CEST (Europe/Vienna)

Complex, statistically improbable things are by their nature
more difficult to explain than
simple, statistically probable things.    Richard Dawkins

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