Displaying 3 results from an estimated 3 matches for "2col".
Did you mean:
2co
2011 Jan 11
1
glm specification where response is a 2col matrix
Hi,
when I apply a glm() model in two ways,
first with the response in a two column matrix specification with
successes and failures
y <- matrix(c(
5, 1,
3, 3,
2, 2,
0, 4), ncol=2, byrow=TRUE)
X <- data.frame(x1 = factor(c(1,1,0,0)),
x2 = factor(c(0,1,0,1)))
glm(y ~ x1 + x2, data = X, family="binomial")
second with a model matrix that
2008 Dec 09
2
Better way to find distances between points in a set?
I was playing around a bit to see how I could find the two points in a
set of points (or ordered pairs) furthest from each other.
Here's what I did:
1) created a Nrow by 2col matrix, so each row contains an x,y coordinate
pair.
2) fed the matrix to a nested mapply (cv is my matrix):
mapply(function(k,l) mapply(function(x,y,a,b)
+ sqrt((x-a)^2+(y-b)^2),cv[,1],cv[,2],k,l),cv[,1],cv[,2])->alldist
Then I just did which.max(alldist) and found the original two points b...
2007 Jun 19
1
Matrix library error: "should never happen; please report"
Hi,
I got the following error. Sorry but this time I couldn't reproduce it
with a simple chunk of code:
.TM.repl.i.2col(): drop 'matrix' case ...
Error in .nextMethod(x = x, i = i, j = j) :
'i' has no integer column number should never happen; please report
In addition: Warning messages:
1: Ambiguous method selection for "%*%", target "ddiMatrix#dgCMatrix" (the
first of...