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 analysis on the same
group of variables (V1--V5) I used before. I'd like to get a similar
descriptive analysis of these principal components by variable V. Correct me
if I am wrong; should I run it on the scores of the 2 or 3 principal
components I obtained in the PCA?
-- 
View this message in context: 
http://r.789695.n4.nabble.com/descriptive-statistics-tp3085197p3086849.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
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.


[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 me some
lines?
-- 
View this message in context: 
http://r.789695.n4.nabble.com/descriptive-statistics-tp3085197p3085197.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
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.


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 set of other variables (V1, V2, V3, V4, V5). And this for all the
other subgroups for values 2 to 14.
What do you suggest?
-- 
View this message in context: 
http://r.789695.n4.nabble.com/descriptive-statistics-tp3085197p3085462.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
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.


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=my.summary,data=data)
summary(var_C~cluster, fun=my.summary,data=data)
summary(var_D~cluster, fun=my.summary,data=data)
summary(var_E~cluster, fun=my.summary,data=data)
summary(var_F~cluster, fun=my.summary,data=data)
summary(var_G~cluster, fun=my.summary,data=data)
}

thanks for your patience.
-- 
View this message in context: 
http://r.789695.n4.nabble.com/descriptive-statistics-tp3085197p3085651.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
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.


[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 message in context: 
http://r.789695.n4.nabble.com/lm-regression-tp3060123p3060123.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
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.


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 understanding of the warning there are two errors, maybe they are
connected. I think I should change an option in the lm changing the responso
from numeric to factor. Is it true? How it can be done? 
-- 
View this message in context: 
http://r.789695.n4.nabble.com/lm-regression-tp3060123p3060363.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
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.