Commit be9ff0af by Eric Coissac

Remove interaction in the case of an anova analysis with a single factor

parent bf976f96
......@@ -251,10 +251,16 @@ anova.pm = function(m,...) {
SChat = sum(VarYhats)
SCE = sum(m$residuals^2)
SCI = VarY - SCE - sum(SChat)
SumSq = c(VarYhats,Interactions=SCI,Residuals=SCE)
Df = c(rep(1,length(VarYhats)+1),m$df.residual)
if (length(Xs)>1) {
SCI = VarY - SCE - sum(SChat)
SumSq = c(VarYhats,Interactions=SCI,Residuals=SCE)
Df = c(rep(1,length(VarYhats)+1),m$df.residual)
}
else {
SumSq = c(VarYhats,Residuals=SCE)
Df = c(1,m$df.residual)
}
MeanSq = SumSq/Df
Fvalue = c(MeanSq[-length(MeanSq)]/MeanSq[length(MeanSq)],NA)
Pvalue = 1-pf(Fvalue,
......@@ -278,6 +284,20 @@ anova.pm = function(m,...) {
return(result)
}
summary.pm = function(object,
correlation = FALSE,
symbolic.cor = FALSE,
...) {
results = list(
call = object$call,
terms= object$terms
)
return(results)
}
mprocuste = function (Y, ...)
{
ctrace <- function(MAT) sum(MAT^2)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment