search for: dmat2

Displaying 4 results from an estimated 4 matches for "dmat2".

Did you mean: dat2
2012 Apr 25
2
comparison of bivariate normal distributions
...1000,5,sd=1),rnorm(1000,6,sd=1)) c2<-data.frame(rnorm(1000,10,sd=2),rnorm(1000,7,sd=1)) xx=seq(0,20,0.1) yy=seq(0,20,0.1) xmult=cbind(rep(yy,201),rep(xx,each=201)) dens=dmvnorm(xmult,mean(c),cov(c)) dmat=matrix(dens,ncol=length(yy),nrow=length(xx),byrow=F) dens2=dmvnorm(xmult,mean(c2),cov(c2)) dmat2=matrix(dens2,ncol=length(yy),nrow=length(xx),byrow=F) contour(xx,yy,dmat,lwd=2) contour(xx,yy,dmat2,lwd=2,add=T) ############################################## Is their an easy way to do this (maybe with dmvnorm()?) and could I interpret the intersect ("shared volume") in the sense of a...
2006 Jun 06
1
Problems using quadprog for solving quadratic programming problem
Hi, I'm using the package quadprog to solve the following quadratic programming problem. I want to minimize the function (b_1-b_2)^2+(b_3-b_4)^2 by the following constraints b_i, i=1,...,4: b_1+b_3=1 b_2+b_4=1 0.1<=b_1<=0.2 0.2<=b_2<=0.4 0.8<=b_3<=0.9 0.6<=b_4<=0.8 In my opinion the solution should be b_1=b_2=0.2 und b_3=b_4=0.8. Unfortunately R doesn't find
2009 Jun 01
1
survreg.distributions() error
...ny <- ncol(y) status <- y[, ny] z <- (y[, 1] - eta)/sigma dmat <- density(z, parms) ## line A: THIS COMMAND DOES NOT GIVE AN ERROR dtemp <- dmat[, 3] * dmat[, 4] if (any(status == 3)) { z2 <- (y[, 2] - eta)/sigma dmat2 <- density(z2) ## line B: THIS IS THE COMMAND THAT GIVES THE ERROR } else { dmat2 <- matrix(0, 1, 5) z2 <- 0 } >From playing with debug() a little bit, it looks to me like if line B (see labels above) called "density(z2, parms)&qu...
2011 Aug 11
1
matrix correlations with different packages
Dear all, I'm calculating matrix correlations with permutation tests and I got this funny result. All correlation coefficients are the same with mantel.test {ncf} and pcol {simba} but the two functions yield dramatically different p-values (using the same number of permutations). Could anyone please enlighten me what is causing the difference and which result I can trust? (My matrices