[R] help_aov

2006-10-30 Thread Thanjavur Bragadeesh
Hi,

I am trying to run an analysis of variance using R.
in my data table x is a continuous variable lengthof 200 and p is a 
categorical variable also of length 200 and p is anyone of three categories 
1,2 or ,3.
if I run
summary(aov(x~p,data=test))
I get
Response: x
 Df  Sum Sq Mean Sq F valuePr(F)
p   1  3174.7  3174.7  42.749 5.175e-10 ***
Residuals 198 14704.274.3
---
and if I run
summary(aov(x~as.factor(p), data=test)) # I get

Response: x
Df  Sum Sq  Mean Sq  F value   Pr(F)
as.factor(p)  2  3175.7  1587.8   21.275  4.31e-09 ***
Residuals   197  14703.274.6


Can anyone kindly explain the difference. How will it affect -correct way to 
run - if it is a two-way anova where I have a second categorical variable 
sex - male or female.

Many Thanks


Yours sincerely,

Bragadeesh

__
R-help@stat.math.ethz.ch 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] Help: chisq.test

2005-12-10 Thread Thanjavur Bragadeesh
I have two groups of patients (improved or not improved) named x and y group 
respectively after being treated with 5 different drugs

X-c(43,52,25,48,57) and

Y-c(237,198,245,212,233)

when I run

chisq.test(cbind(x,y))

I get a p value of 0.0024

but if I run

chisq.test(x,y)   I get a p value of 0.22 not significant at 5%


what is the difference between the two

thanks

bragadeesh

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


[R] help

2003-02-21 Thread Thanjavur Bragadeesh

Hi,

help.I would like to plot the mean and standard deviation against a factor 
in the xaxis- in other words I want an errorplot. I also want to put the 
standard deviation like a T on top of a barplot.  How can do this in R

Bragadeesh

__
[EMAIL PROTECTED] mailing list
http://www.stat.math.ethz.ch/mailman/listinfo/r-help