Let's say I have 12 observation of 5 variables and my first variable is 
categorical (with 4 different levels). I am trying to find out statistical 
significance difference between these categorical levels for each variable, but 
my  function is not working! Please note that my data "x" are in data.frame 
format.
Any suggestion would be helpful.Many thanks.

function(x)
{
    x1 <- numeric
    x2 <- numeric
    for(i in 2:length(x)) {
        x1[i] <- summary(aov(x[, i] ~ factor(x[, 1])))
        x2[i] <- x1[i]$Pr[1]  #Pr is the probability values
        if(x2[i] < 0.06)
            x2[i] <- 1
        else x2[i] <- 0    
    }
    x2
}




        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to