Re: [R] Re : Re: descriptive statistics

2010-12-14 Thread effeesse
Thanks! I got the results! Now I would like to put them in a nice and readable plot to see if there are outlier means or variances. Using "plot(by_many$mean)" I got "Error in by_many$mean : object of type 'closure' is not subsettable". Another question: I have done the principal components analys

Re: [R] Re : Re : descriptive statistics

2010-12-13 Thread effeesse
what am I supposed to put into function(x)? The indicator for extracting the subgroups? data is the df. cluster={1,...,14}. This is how I was compiling: "for (i in 1:14) { my.summary<-data$cluster==i c(mean(?),var(?)) summary(var_A~cluster, fun=my.summary,data=data) summary(var_B~cluster, fun=m

Re: [R] Re : descriptive statistics

2010-12-13 Thread effeesse
I am sorry, but I cannot understand how to use the "summary" function. Maybe, if I describe my needs, you could sketch a line that could work. In the data set variable "V" can take values 1 to 14. For the subgroup of individuals where "V" takes value =1 I want the mean and variance of a certain se

[R] descriptive statistics

2010-12-13 Thread effeesse
Hi. In a data set I have a variable that takes values from 1 to 14. For each subgroup of values of this variable, I would like to obtain some descriptive statistics of other variables present in the data set. I've been trying with a "for" loop but I couldn't get nothing. Could you please suggest m

Re: [R] lm regression

2010-11-26 Thread effeesse
I found one error in in the code, however, I still receive errors. Error in storage.mode(y) <- "double" : invalid to change the storage mode of a factor Moreover: Warning message: In model.response(mf, "numeric") : using type="numeric" with a factor response will be ignored >From my unders

[R] lm regression

2010-11-26 Thread effeesse
Hi! My regression is lm(Y ~ A + B + C + D + E + F + G), where each covariate "A--G" is of the kind "as.factor(column of the dataframe)". I receive an error for the first explanatory variable "A": Error in column of the dataframe: wrong number of dimensions. What does it mean? -- View this messag