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

posted by dmfisher – USA, 2015-06-09 05:55 (3572 d 21:04 ago) – Posting: # 14930
Views: 52,057

(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,409 posts in 4,921 threads, 1,670 registered users;
22 visitors (0 registered, 22 guests [including 8 identified bots]).
Forum time: 01:59 CET (Europe/Vienna)

Ignorance more frequently begets confidence
than does knowledge.    Charles Darwin

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