Hi All,
I have a question regarding contingency tables. I would like to calculate the
mean and standard deviation of a continuous variable from my own dataset based
on the percentages of a contingency table I obtained from a scientific article.
dataset- data.frame(cbind(case=rep(0:1,5),
On May 19, 2012, at 7:46 AM, Ross, Stephanie wrote:
Hi All,
I have a question regarding contingency tables. I would like to
calculate the mean and standard deviation of a continuous variable
from my own dataset based on the percentages of a contingency table
I obtained from a scientific
Do you actually know what contingency table means?
The tables in your example make no sense at all as contingency
tables *especially if obs means observed and exp means
expected.
You can, however, extra the tables in the manner which you seem
to desire, as follows: Let your data object be
Hello,
I want to create contingency table. The data which should be presented in
contingency table look like this.(Its a very long list. I am copying small
part of it)
obs1obs2exp1 exp2
3 8 725 875
0 0 5870
3 7
This is my list.
obs1obs2exp1 exp2
3 8 725 875
0 0 5870
3 7 435 525
10 7 754 910
0 1 145 175
and i want result in contingency table as
obs 3
On Dec 20, 2011, at 12:36 PM, reena wrote:
This is my list.
obs1obs2exp1 exp2
3 8 725 875
0 0 5870
3 7 435 525
10 7 754 910
0 1 145 175
and i want
...@msn.com wrote:
From: Laura Clasemann violagirl...@msn.com
Subject: [R] Contingency table in R
To: r-help@r-project.org
Received: Wednesday, March 2, 2011, 9:13 AM
Hi,
I have a table in R with data I needed and need to create a
contingency table out of it. The table I have so far looks
On 03/03/2011 01:13 AM, Laura Clasemann wrote:
Hi,
I have a table in R with data I needed and need to create a contingency table
out of it. The table I have so far looks like this:
Binger
r
DietType No Yes
Dangerous 15 12
Healthy52 9
None 134
Hi,
I have a table in R with data I needed and need to create a contingency table
out of it. The table I have so far looks like this:
Binger
r
DietType No Yes
Dangerous 15 12
Healthy52 9
None 134 24
Unhealthy 72 23
These are the error
Hi Laura,
On Wed, Mar 2, 2011 at 9:13 AM, Laura Clasemann violagirl...@msn.com wrote:
Hi,
I have a table in R with data I needed and need to create a contingency table
out of it. The table I have so far looks like this:
Binger
r
DietType No Yes
Dangerous 15 12
Hi Laura and R users,
I would like to know whether we can do siginificance test between Column Yes
and Column No.
Any one tried? I have seen it in Tabulaiton software packages from our
vendors and in SPSS Custom Table.
Thanks,
On Wed, Mar 2, 2011 at 7:43 PM, Laura Clasemann
Dear David and the list,
Thanks for your comment.
Unfortunately, I don't have an instructor on R.
And I usually don't deal with contingency table analysis.
I have consulted more than two books on R already, but I found no good answer.
Could you point me to some references about log linear
If you want to *see* the contributions of the cells to the association
between lang and cons, try
library(vcd)
mosaic(~lang+cons, data=langcons.table, shade=TRUE)
Tsunhin John Wong wrote:
Dear R users,
I have a question of how to do some specific cell to cell comparisons
on a R x C
Dear R users,
I have a question of how to do some specific cell to cell comparisons
on a R x C contingency table.
The table is a 3 x 5 table with frequency / count data.
langcons.table - table(lang, cons)
langcons.table[cbind(lang,cons)] - freq
langcons.table
Adj Int Oth Pas Tra
C 69 221
On Jul 21, 2010, at 8:07 AM, Tsunhin John Wong wrote:
Dear R users,
I have a question of how to do some specific cell to cell comparisons
on a R x C contingency table.
The table is a 3 x 5 table with frequency / count data.
langcons.table - table(lang, cons)
langcons.table[cbind(lang,cons)]
Hi guys I'm hoping someone can help me with this. It should be easy but it
seems to get stuck for no obvious reason! I am trying to set a report up in
odfWeave so that we can re-run the same analysis at 3 time points as the data
matures and provide an 'instant' report.
To simplify the
Solved my own problem by using:
odfTable.matrix(
as.matrix (
with (mydata, table (site_id, reaction))
)
)
This message may contain confidential information. If
Polwart Calum,
Although I cannot explain the root issue, it has nothing to do with
odfWeave. See the second command below. I don't know your versions etc
blah blah blah...
class(with (mydata, table (site_id, reaction)))
[1] table
class(as.matrix(with (mydata, table (site_id, reaction
[1]
Hello R-Users!
I need a little help to build up a contingency table out of several
variables.
A-c(F,M,M,F,F,F,F,M,F,M,F,F)
B-c(0,0,0,0,0,0,1,1,1,1,0,1)
C-c(0,1,1,1,1,1,1,1,1,0,0,0)
ABC-as.data.frame(cbind(A,B,C))
ABC
A B C
1 F 0 0
2 M 0 1
3 M 0 1
4 F 0 1
5 F 0 1
6 F 0 1
7
First of all your construction of ABC leads to a structure with 3 factor
variables due to the way cbind processes the input variables - which is
not intended I think.
You can do sth like
ABC-data.frame(A,B,C)
aggregate(ABC[,2:3],by=list(A),sum)
hth.
Birgitle schrieb:
Hello R-Users!
I
Thanks for your answer.
It is intended, that the variables are treated as class factor, because
these are binary variables with, for example, the presence or the absence of
a plant organ.
As far as I understood, I have to treat them for other calculations as
factor. Therefore I classified these
Ok, then treat them as factors - but if they are really binary and coded
0 and 1, which kind of calculation would lead to different results for a
factor instead of a numeric variable?
Anyway,
ABC-as.data.frame(cbind(A,B,C))
aggregate(ABC[,2:3],by=list(A),FUN=function(x)sum(x=='1')) # '1' is
I think it makes a difference if I want to use a classification method like
rpart () or if I use a modelling approach like glm().
Many thanks for the kind and fast help. I am still very untrained and it is
difficult for me to create such codes.
B.
Eik Vettorazzi wrote:
Ok, then treat them
Have a look at
length(iris$Species)
length(prev)
--- Carla Rebelo [EMAIL PROTECTED] wrote:
Hello!
May you help me? I'm trying to do a contingency
table using this
data(iris)
library(rpart)
modelo - rpart(Species ~., iris)
prev - predict(modelo, iris)
Finally the contingency
Hello!
May you help me? I'm trying to do a contingency table using this
data(iris)
library(rpart)
modelo - rpart(Species ~., iris)
prev - predict(modelo, iris)
Finally the contingency table
table(iris$Species, prev)
But an error occurs:
Error in table(iris$Species, prev) :
all
I don't know if this you want but, you can try:
table(data.frame(prev, iris$Species))
On 14/02/2008, Carla Rebelo [EMAIL PROTECTED] wrote:
Hello!
May you help me? I'm trying to do a contingency table using this
data(iris)
library(rpart)
modelo - rpart(Species ~., iris)
prev
Try looking at 'prev' (it is a matrix) and then reading ?predict.rpart to
see why. My guess is that you intended type=class.
On Thu, 14 Feb 2008, Carla Rebelo wrote:
Hello!
May you help me? I'm trying to do a contingency table using this
data(iris)
library(rpart)
modelo -
I am sorry if this is a faq or tutorial somewhere, but I am unable to
solve this one.
What I am looking for is a count of how many different
categories(numbers in this case) that appears for a given factor.
Example:
l - c(Yes, No, Perhaps)
x - factor( sample(l, 10, replace=T), levels=l )
m
Karin Lagesen wrote:
I am sorry if this is a faq or tutorial somewhere, but I am unable to
solve this one.
What I am looking for is a count of how many different
categories(numbers in this case) that appears for a given factor.
Example:
l - c(Yes, No, Perhaps)
x - factor( sample(l,
It is not a good idea to use sample' when building an
example like this! Running the code does not give the
example dataframe.
This is crude but it will do what you want.
x - Z Y X
1 4 Yes
2 1 No
3 2 Perhaps
4 3 Yes
5 4 No
6 5 No
7 1 Yes
30 matches
Mail list logo