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

posted by dmfisher – USA, 2015-06-09 05:55 (3540 d 11:06 ago) – Posting: # 14930
Views: 51,979

(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,381 posts in 4,914 threads, 1,663 registered users;
38 visitors (0 registered, 38 guests [including 6 identified bots]).
Forum time: 16:01 CET (Europe/Vienna)

Science is built up with facts, as a house is with stones.
But a collection of facts is no more a science
than a heap of stones is a house.    Henri Poincaré

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