View source: R/fanova.hetero.R
fanova.hetero | R Documentation |
Univariate ANOVA for heteroscedastic data.
fanova.hetero(object = NULL, formula, pr = FALSE, contrast = NULL, ...)
object |
A data frame with dimension ( |
formula |
as formula. |
pr |
If TRUE, print intermediate results. |
contrast |
List of special contrast to be used, by default no special
contrasts are used ( |
... |
Further arguments passed to or from other methods. |
This function fits a univariate analysis of variance model and allows
calculate special contrasts defined by the user. The list of special
contrast to be used for some of the factors in the formula. Each matrix of
the list has r
rows and r-1
columns.
The user can also request special predetermined contrasts, for example using
contr.helmert
, contr.sum
or
contr.treatment
functions.
Return:
ans A list with components including: the Beta estimation Est
,
the factor degrees of freedom df1
, the residual degrees of freedom
df2
and p-value
for each factor.
contrast List of special contrasts.
anova.hetero deprecated
It only works with categorical variables.
Manuel Febrero-Bande, Manuel Oviedo de la Fuente manuel.oviedo@udc.es
Brunner, E., Dette, H., Munk, A. Box-Type Approximations in Nonparametric Factorial Designs. Journal of the American Statistical Association, Vol. 92, No. 440 (Dec., 1997), pp. 1494-1502.
See Also as: fanova.RPm
## Not run: data(phoneme) ind=1 # beetwen 1:150 fdataobj=data.frame(phoneme$learn[["data"]][,ind]) n=dim(fdataobj)[1] group<-factor(phoneme$classlearn) #ex 1: real factor and random factor group.rand=as.factor(sample(rep(1:3,n),n)) f=data.frame(group,group.rand) mm=data.frame(fdataobj,f) colnames(mm)=c("value","group","group.rand") out1=fanova.hetero(object=mm[,-2],value~group.rand,pr=FALSE) out2=fanova.hetero(object=mm[,-3],value~group,pr=FALSE) out1 out2 #ex 2: real factor, random factor and special contrasts cr5=contr.sum(5) #each level vs last level cr3=c(1,0,-1) #first level vs last level out.contrast=fanova.hetero(object=mm[,-3],value~group,pr=FALSE, contrast=list(group=cr5)) out.contrast ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.