similar to: Exact test in nxm contingency table

Displaying 20 results from an estimated 300 matches similar to: "Exact test in nxm contingency table"

2003 Apr 02
1
Can boot return matrix?
Dear All, I have a function which takes a n x m matrix as an argument and returns an n x n matrix. I want to take bootstrap samples form the input matrix in the way as each row represent a multivariate observation, so each bootstrap sample would be an n x m matrix, and on each sample I want to calculate the n x n matrix. This task can be done with the sample function, but I would like to use
2007 Jul 31
3
Nonlinear optimization with constraints
Hello R community, I am using R for creating a model using optimization. I would like to ask if there is R-function/package for solving the problem below: Minimize sum(abs(exp^(Ai1 x1 + Ai2 x2 + ... + Aim xm - bi) - 1)), for each i = 1, ..., n. subject to Ai1 x1 + Ai2 x2 + ... + Ajm xm - bi <= c, where c is a scalar. (x is a vector of variables, A is nxm matrix, b is a vector)
2001 May 19
2
calculations on diagonals of a matrix
Given an nxm matrix A I want to compute the nxm matrix B whose ij-th element is the sum of the elements of A lying on the diagonal that ends with element ij, i.e., b_ij = a_ij + a_(i-1)(j-1) + a_(i-2)(j-2) + ... In APL (which I no longer use), I would use the 'rotate' operator to derive an array whose columns are diagonals of the given array and then cumulate down columns. Is
2003 Nov 03
3
A matrix is full rank is equal to having independent columns?
Dear R listers, Just a simple question. If we say an nxm matrix (n>m) is full rank of m, does this mean that this matrix has linearly independent columns? They are the same definition or needs some proof? Thanks for your answer. Fred [[alternative HTML version deleted]]
2006 Apr 01
1
Using vectorization instead of for loop for performing a calculation efficiently
I am trying to write an efficient function that will do the following: Given an nxm matrix, 10 rows (observations) by 10 columns (samples) for each row, test of all values in the row are greater than a value k If all values are greater than k, then set all values to NA (or something), Return an nxm matrix with the modified rows. If I do this with a matrix of 20,000 rows, I will be waiting until
2018 May 04
0
RFC: virtual-like methods via LLVM-style RTTI
On 3 May 2018, at 22:09, David Zarzycki via llvm-dev <llvm-dev at lists.llvm.org> wrote: > > Hello, > > In an effort to help LLVM-style projects save memory, I’ve been toying with some macros that provide an alternative to C++ vtables that use LLVM-style RTTI design patterns instead. Is this something that LLVM or sub-projects think is worth pursuing? Or are the macros below
2007 Mar 05
2
Linear programming with sparse matrix input format?
Hi. I am aware of three different R packages for linear programming: glpk, linprog, lpSolve. From what I can tell, if there are N variables and M constraints, all these solvers require the full NxM constraint matrix. Some linear solvers I know of (not in R) have a sparse matrix input format. Are there any linear solvers in R that have a sparse matrix input format? (including the
2011 Jul 19
3
calculating the mean of a random matrix (by row) and some general questions
Hi everyone! I'm trying to teach myself R in order to do some data analysis. I'm a mathematics student and (only) familiar with matlab and latex. I'm working trough the "official" introduction to R at the moment, while simultaneously solving some exercises I found in the web. Before I post my (probably stupid) question, I'd like to ask you for some general advice. How do
2018 May 03
3
RFC: virtual-like methods via LLVM-style RTTI
Hello, In an effort to help LLVM-style projects save memory, I’ve been toying with some macros that provide an alternative to C++ vtables that use LLVM-style RTTI design patterns instead. Is this something that LLVM or sub-projects think is worth pursuing? Or are the macros below too ugly/problematic? Feedback would be appreciated. Thanks, Dave //===- llvm/Support/VTable.h - LLVM-style
2006 Sep 21
1
How to generating diagnal blocks ?
Hi, I am trying to creat a matrix with diagnal blocks, say, I have a matrix X of any dimension (nxm) ,and would like to have: X X X
2009 Mar 13
1
Help with Function!
Dear All, I need to write 'n' functions on 'm' variables. The functions should be constructed according to the values of an (nxm) matrix of '1/0' values as follows. For example, if row1 is equal to ,say [1 0 .......0 0] then f1 <- (1+x1) if row 2 is equal to, say [1 1 1 0...0 1] then f2 <-(1+x1)*(1+x2)*(1+x3)*(1+xm) if row n is equal to [0 1 0 1 1 0 ..... 0] then
2009 Dec 04
1
Converting a Matrix in a colum vector
Hi all, Imagine I have a matrix G with N rows and M columns So L=NxM is the number of different cells in my matrix. I want to create a column vector F whose size will be F(L,1) So the fisrt row in F is G(1,1) Second row in F is G(1,2) When we arrive to a point M the element M+1 will be G(2, 1) Element M+2 will be G(2,2) and so on. I´m trying but allways error.... Easy Example: G= 2 3 4
2011 Aug 20
1
t() prior to data rotation
Dear All, I have come upon an R-mode PCA protocol that uses the following arguments, where "mydata.txt" is an nxm matrix of n objects and m variables: > a <- read.table("mydata.txt") > b <- t(a) > c <- prcomp(b) > c$rotation The user then plots the coordinates given by c$rotation (PC1 and PC2) as the "scores" of their PCA plot. This
2012 Jul 31
1
ways of getting around allocMatrix limit?
I need to multiply to very large, nonsparse matrices, and so get the error "allocMatrix: too many elements specified". Is there a way to set the limit for allocMatrix? In my case, the two matrices, A and B, are nxm and mxp where m is small, so I could subdivide each into blocks of submatrices A=rbind(A1,A2,...) and B=cbind(B1,B2,...) then multiply each pair of submatrices, but I was
2001 Jun 12
1
cophenetic matrix
Hello, I analyse some free-sorting data so I use hierarchical clustering. I want to compare my proximity matrix with the tree representation to evalute the fitting. (stress, cophenetic correlation (pearson's correlation)...) "The cophenetic similarity of two objects a and b is defined as the similarity level at wich objects a and b become members of the same cluster during the course of
2005 Apr 15
5
Pearson corelation and p-value for matrix
Hi, I was trying to evaluate the pearson correlation and the p-values for an nxm matrix, where each row represents a vector. One way to do it would be to iterate through each row, and find its correlation value( and the p-value) with respect to the other rows. Is there some function by which I can use the matrix as input? Ideally, the output would be an nxn matrix, containing the p-values
2012 Apr 25
2
comparison of bivariate normal distributions
sorry for cross-posting Dear all, I have tow (several) bivariate distributions with a known mean and variance-covariance structure (hence a known density function) that I would like to compare in order to get an intersect that tells me something about "how different" these distributions are (as t-statistics for univariate distributions). In order to visualize what I mean hear a little
2010 Sep 12
4
using read.table, removing extra quotation mark from a text field? (e.g. ""cat" )
I am using read.table to import a text file within R.   There are several "errors" in my text file.  An "extra" quotation mark has inadvertently been included within a few text fields.   e.g. for a pipe (|) delimited text file, I have something similar to this:   1|7|30| "dog" 2|6|25| ""cat" 3|4|20|"" 4|5| 56| "mouse" 5|3|56|
2004 Jul 13
1
locator() in a multiple plot setting
Hi based on some code from Thomas Petzoldt, I have a question: --- opar <- par(mfrow = c(2,4)) slices <- 8 m <- matrix(runif(100),10,10) my.list <- list() for (slice in 1:slices) { my.list[[slice]] <- m } for (slice in 1:slices) { x <- 1*(1:25) y <- 1*(1:25) z <- my.list[[slice]] image(list(x = 0:9, y = 0:9, z = z)) } par(opar) #restore device
2008 Jan 04
2
Moved/Renamed Files
Hi, It seems that rsync transfers files whose names was changed or which were moved to another directory since the previous synchronization. I think that ability not to transfer (large) files which are present on another computer would be very helpful. Right before rsync is going to transfer some large file it could check if there some other files with the same size ( and maybe the same mtime