1 |
mean |
|
sd |
|
obs |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | ##---- Should be DIRECTLY executable !! ----
##-- ==> Define data, use random,
##-- or do help(data=index) for the standard data sets.
## The function is currently defined as
function(mean,sd,obs){
gmean<-sum(mean*obs)/sum(obs)
df1<-(length(mean)-1)
df2<-(sum(obs)-length(mean))
ssbetween<-sum((mean-gmean)^2*obs)
msbetween<-ssbetween/df1
sswithin<-sum(sd^2*(obs-1))
mswithin<-sswithin/df2
F<-msbetween/mswithin
p.value<- 1- pf(q=F, df1=df1, df2=df2,lower.tail=T)
ANOVA<-list(MSbw=msbetween,MSwt=mswithin,F=F,p.value=p.value)
return(ANOVA)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.