Displaying 20 results from an estimated 351 matches for "2x2".
Did you mean:
22
2011 Apr 28
5
fisher exact for > 2x2 table
I'm using fisher.exact on a 4x2 table and it seems to work.
Does anyone know exactly what is going on? I thought fisher.exact is only
for 2x2 tables.
Note: I can't use chi-squared because I have a couple of cells with 0 and <
5 observations.
--
View this message in context: http://r.789695.n4.nabble.com/fisher-exact-for-2x2-table-tp3481979p3481979.html
Sent from the R help mailing list archive at Nabble.com.
2008 Dec 26
3
lm() with same formula but different column/factor combinations in data frame
...a frame TEST1 has four factor columns followed by thirteen
numeric columns defined as :
1) Community, levels: "20232"
2) WT, levels: "B", "E", "M"
3) LTC, levels: "L", "M", "S", "1"
4) UC, levels: "1X1", "2X2"
5) UncDmd: Response variable in the linear model
6-16) M1...M11: Explanatory variables in the linear model
A few sample rows in the data frame are as follows:
> TEST1[1:15,]
Community WT LTC UC UncDmd M1 M2 M3 M4 M5 M6 M7 M8 M9 M10 M11
1 20232 E L 1X1 1.000000 0 0 0 0 0...
2011 Apr 22
1
Create 2x2 table from summary data and run chi square test.
R 2.12
windows 7
I am summary data that I would like to make into a 2x2 table representing counts positive vs. negative counts:
28/289 20/276
My table should look something like the following:
group1 group2
Positive 28 20
Negative 289 276
How can a (1) create the 2x2 table
(2) run a chi square test on the table?
I have tried the fo...
2012 Oct 22
4
Help with applying a function to all possible 2x2 submatrices
Hi all,
I'm working with a large data set (on the order of 300X300) and trying to
apply a function which compares the elements of all possible 2x2
submatrices. There are rc(r-1)(c-1) such submatrices, so obviously the naive
method of looping through the rows and columns is computationally unfeasible
for my data set:
for(i in 1:(nrow(data)-1)) {
for(j in (i+1):nrow(data)) {
for (m in 1:(ncol(data)-1)) {
for (n in (m+1):nco...
2006 Feb 01
3
format of 2x2 table
Does anyone know how I can generate a 2x2 table in a
format where in each cell of the table, it contains a)
count (frequency) b) total percentage c) row
percentage d) column percentage. SAS can generate this
format easily, is there a R package that can do this?
Frequency |
Percent |
Row Pct |
Col Pct | positive negative | Total
-...
2005 Dec 06
3
Coefficient of association for 2x2 contingency tables
Hi,
Found no measure of association or correlation for 2x2 contingency tables in
fullrefman.pdf or google. Can someone point to a package that implements such
calculations?
Thanx.
--
Alexandre Santos Aguiar
- consultoria para pesquisa em sa??de -
R Botucatu, 591 cj 81
tel 11-9320-2046
fax 11-5549-8760
ww...
2008 Apr 19
1
Mantel-Haenszel for 2x2
Hi all,
Does anyone know if an R function for the Mantel-Haenszel chi-square for a
2x2 table exists? I’ve also seen it called the randomization Q statistic.
Note that I’m not looking for the Cochran-Mantel-Haenszel…I did see that out
there as cmh.test.
Thanks in advance,
Jeff
Internal Virus Database is out-of-date.
Checked by AVG Free Edition.
11:27 AM
[[alternative HT...
2012 Mar 09
1
Simulating n 2x2 tables with the same odds ratio
Hello.
I'm looking for a method to simulate n different 2x2 tables having all the
same odds ratio.
For example.
I need
100 tables with odds ratio 1
100 tables with odds ratio 2
100 tables with odds ratio 3
and so on.
All tables should have the same marginal frequencies.
Thank you
--
View this message in context: http://r.789695.n4.nabble.com/Simulati...
2010 Jun 17
2
Multiple plots in a single page and stripplot()
I want to make a 2x2 plot on a single page, using stripplot() and boxplot().
I tried the following two alternatives with mfrow() and layout(), but none
of them worked.
library(lattice)
par(mfrow=c(2,2))
boxplot(X1 ~ Y, data=tst1, horizontal=T, las=1)
boxplot(X2 ~ Y, data=tst1, horizontal=T, las=1)
stripplot(Y ~ X1, da...
2004 Oct 29
1
[rmetasim] Need help deciphering this error msg... targeted to those who use rmetasim...
...'rmetasim' library
library(rmetasim)
penguinland <- new.landscape.empty()
penguinland <- new.intparam.land(penguinland,h=2,s=3)
penguinland <- new.floatparam.land(penguinland,s=0)
penguinland <- new.switchparam.land(penguinland,mp=0)
## local matrices are 3x3 (or greater than 2x2)
matrixR <- matrix( c(rep(0.2, 3*3)),
ncol=3,nrow=3,byrow=TRUE )
matrixS <- matrix( c(rep(0.1, 3*3)),
ncol=3,nrow=3,byrow=TRUE )
matrixM <- matrix( c(1.0, 0.0, 1.0, 0.0, 1.0, 0.0,
1.0, 0.0, 1.0), ncol=3,nrow=3,byrow=TRUE )
penguinland <-
new.local.demo(penguinland,matrixR,matrixS,matrix...
2004 Feb 17
2
Generating 2x2 contingency tables
Hello R-users,
I would like to generate two-way contingency tables with zero in one cell. I tried to use the function r2dtable but I could not force one cell to have zero value.
Any Idea?
Best regards..
Mahmoud
[[alternative HTML version deleted]]
2007 Aug 14
0
Limma - 2x2 factorial design matrix
Hi all,
I'm working on microarray and currently analyzing the microrarray data using limmaGUI. Loop design has been applied in this experiment. This is a 2X2 factorial experiment where there are control and treatment at 2 different time points, week 6 and 9. The experimental design is almost the same as the limmaGUI work example: Weaver Data set. I would like to look at the effect of time, treatment and interaction. I have tried to follow the limmaGUI h...
2007 Nov 08
0
analysis of 2x2 tables of various designs
Dear Colleagues,
Could you recommend a package of combination of functions in R for
analysis of 2x2 tables of various designs. Preferably it should include
tests and confidence limits (both exact and approximate) for alternative
designs, such as independent proportions (e.g. parallel group clinical
trials) and correlated proportions (matched pairs and crossover
studies).
Many thanks
MM...
2006 Sep 28
0
mx2 contingency tables or (2^(m-1)-1)'s 2x2 contingency tables in the context of feature selection for random forest
...ls. So suppose again I have 1000 such
multiple-leveled category variables and I need to do some feature
selection. Then I would like to try chi-sqr tests (or information
gain).
To match the splitting method used in rf, I am thinking if I should
simply use mx2 contingency table or (2^(m-1)-1)'s 2x2 contingency
tables in which I pick the best p-value to evaluate A's power. For the
latter, I am sure it is very alike the way used in rf. But is the
former good enough?
Thanks.
--
Weiwei Shi, Ph.D
Research Scientist
GeneGO, Inc.
"Did you always know?"
"No, I did not. But I bel...
2006 Jul 11
2
Multiple tests on 2 way-ANOVA
...viation of the residuals
cov1 <- matrix(c(3/4,-1/2,-1/2,-1/2,1,0,-1/2,0,1), nrow = 3, ncol=3, byrow=TRUE,
dimnames = list(c("A", "B", "C"), c("C.1", "C.2", "C.3")))
# cov1 = variance covariance matrix of the beta coefficients of a
# 2x2 factorial design (see Piantadosi 2005, p. 509)
cm1 <- matrix(c(0, 1, 0, 0, 0, 1), nrow = 2, ncol=3, byrow=TRUE,
dimnames = list(c("A", "B"), c("C.1", "C.2", "C.3")))
# cm1 = contrast matrix for main effects
v1 <- csimint(estpar=c(100, 6, 5...
2012 Jul 16
2
Tk grid problem
Hi everybody,
I have a problem with the grid function in tk.
I juste try to put 4 buttons like this:
-------------------
| | |
| | C |
| A |--------|
| | |
---------- D |
| | |
| B | |
-------------------
A is 2x2
C is 1x2
B is 1x2
D is 2x2
but the code bellow dont work :
require(tcltk)
tt <- tktoplevel(borderwidth=10)
A.but <- tkbutton(tt,text="A",command=function()ls())
B.but <- tkbutton(tt,text="B",command=function()ls())
C.but <- tkbutton(tt,text="C",comma...
2009 Jul 22
6
A question on operation on list
Hi,
I have created a list object like that :
x = vector("list")
for (i in 1:5) x[[i]] = rnorm(2)
x
Now I want to do two things :
1. for each i, I want to do following matrix calculation : t(x[[i]]) %*%
x[[i]] i.e. for each i, I want to get a 2x2 matrix
2. Next I want to get x[[1]] + x[[2]] +....
I did following : res=vector("list"); res = sapply(x, function(i) t(x[[i]])
%*% x[[i]])
However above syntax is not giving desired result. Any suggestion please?
--
View this message in context: http://www.nabble.com/A-question-on-ope...
2010 Sep 19
1
odds ratios for n-way tables: seeking an *apply-able method
...r 2 x 2 x {strata} frequency
tables in vcd::oddsratio() to R x C x {strata} tables.
For an R x C table, F, odds ratios can be defined
in several ways; one simple way, particularly for tables with ordered
factors, is to calculate the
set of continuation odds ratios, based on the (R-1)x(C-1) set of 2x2
tables with elements
F[i:(i+1), j:(j+1)]
What I think I want is a method to extract all such 2x2 subtables to a
structure (list?) so that I can use
*apply or plyr methods to do the computations of (log) odds ratio (& std
error) for each, and return these
in a suitable form.
Below, I defin...
2009 Sep 08
1
Should digium build a 2FXO / 2FXS 4-port daughter board?
...-series daughter board, you give up TWO
of your physical ports.
Is there a technical reason for the lack of such a card, or is it just a
case of "insufficient business case" to justify the development?
If it's the latter, I would like to state that I am ready to buy several
'2x2' cards.
I also assume I am not alone. I often run into situations where I am space
constrained (embedded enclosure) or resource constrained (bus slots 1u
rackmount) which rule out the obvious solution of a larger card
(AEX/TDM2400P) and/or rule out the inclusion of an additional 4-port
i...
2006 Aug 25
2
horizontal direct product
II am translating some gauss code into R, and gauss has a matrix
product function called the horizontal direct product (*~), which is
some sort of variant on the Kronecker product.
For example if x is 2x2 and y is 2x2
the horizontal direct product, z, of x and y is defined (in the Gauss
manual) as:
row 1 = x11*y11 x11*y12 x12*y11 x12*y12
row 2 = x21*y21 x21*y22 x22*y21 x22*y22
Or in R code if:
x <- matrix(seq(1,4,by=1),2,2, byrow=TRUE)
y <- matrix(seq(5,8,by=1),2,2, byrow=TRUE)
The resu...