search for: q_1

Displaying 8 results from an estimated 8 matches for "q_1".

Did you mean: __1
2010 Sep 26
8
the function doesn´t work
...body help me? the graphic doesn?t work and also the function. thnx a lot. N=10 n=100 p_0=c(1/5,1-1/5) power = function(p,m) { set.seed(1000) H=matrix(0,nrow=N,ncol=1) for(i in 1:N) { x <- matrix(rnorm(n, 0, 0.5), ncol = m) y <- matrix(rnorm(n, 0, 0.8), ncol = m) l <- diag(cor(x, y)) q_1 = qnorm(0.05, 0, 0.05) q_2 = qnorm(1 - 0.05, 0, 0.05) p <- (l^2)/sum(l^2) H[i] <- sum(p_0*log(p_0)) - sum(p * log(p)) } 1- mean(q_1 <= H & H <= q_2) } m=seq(10,50,len=10) f=outer(p,m,Vectorize(power)) persp(p,m,power,theta=-50,phi=30,d=4,border="black") -- View this m...
2010 Sep 25
1
(no subject)
...alpha = .05, seeder = 1000) { set.seed(seeder) x <- matrix(rnorm(n, 0, 0.5), ncol = m) y <- matrix(rnorm(n, 0, 0.8), ncol = m) l <- diag(cor(x, y)) cat("Correlations between two random variables \n", l, fill = TRUE) gute <- function(x, m, alpha) { q_1 <- qnorm(alpha, 0, 0.05) q_2 <- qnorm(1 - alpha, 0, 0.05) p <- (x^2)/sum(x^2) H <- log(m) - sum(p * log(p), na.rm = TRUE) 1 - mean(q_1 <= H & H <= q_2) } dat <- seq(0, 1, length.out = 10) output <- gute(x = dat, m = m, alpha = alpha)...
2010 Sep 25
3
3D plot
...fun <- function(n, m, alpha = .05, seeder = 1000) { l=matrix(0,nrow=m,ncol=N) for(i in 1:N){ set.seed(i) for(j in 1:m){ x=rnorm(n,0,0.5) y=rnorm(n,0,0.8) l[j,i]=cor((x[(((j-1)*k)+1):(((j-1)*k)+k)]), (y[(((j-1)*k)+1):(((j-1)*k)+k)])) } } for(i in 1:N){ for (j in 1:m){ gute <- function() { q_1 <- qnorm(alpha, 0, 0.05) q_2 <- qnorm(1 - alpha, 0, 0.05) p=matrix(0,nrow=m,ncol=N) H=matrix(0,nrow=N,ncol=1) p[j,i]=x[j]^2/sum(x[,i]^2) } H[i]=log(m)-sum(p[,i]*log(p[,i])) } 1 - mean(q_1 <= H & H <= q_2) } output <- gute(a = l[,i]) return(output) } regards jethi -...
2007 Apr 24
1
Matrix: how to re-use the symbolic Cholesky factorization?
I have been playing around with sparse matrices in the Matrix package, in particularly with the Cholesky factorization of matrices of class dsCMatrix. And BTW, what a fantastic package. My problem is that I have to carry out repeated Cholesky factorization of a spares symmetric matrices, say Q_1, Q_2, ...,Q_n, where the Q's have the same non-zero pattern. I know in this case one does only need to carry out the symbolic factorization _once_ and then follow that up with a numerical factorization for each of the Q_i's (re-using the general symbolic factorization each time). Does...
2011 Aug 10
0
[LLVMdev] Handling of pointer difference in llvm-gcc and clang
..., > sub with nsw is a trap value. > > Is this a bug in llvm-gcc? in llvm-gcc (and dragonegg) this is coming directly from GCC's gimple: f (int * p, int * q) { long int D.2718; long int D.2717; long int p.1; long int q.0; int D.2714; <bb 2>: q.0_2 = (long int) q_1(D); p.1_4 = (long int) p_3(D); D.2717_5 = q.0_2 - p.1_4; D.2718_6 = D.2717_5 /[ex] 4; D.2714_7 = (int) D.2718_6; return D.2714_7; } Signed overflow in the difference of two long int (ptrdiff_t) values results in undefined behaviour according to the GCC type system, which is where t...
2011 Aug 10
3
[LLVMdev] Handling of pointer difference in llvm-gcc and clang
Hi, We are developing a bounded model checker for C/C++ programs (http://baldur.iti.kit.edu/llbmc/) that operates on LLVM's intermediate representation. While checking a C++ program that uses STL containers we noticed that llvm-gcc and clang handle pointer differences in disagreeing ways. Consider the following C function: int f(int *p, int *q) { return q - p; } Here's the
2012 May 18
1
Finding the Principal components
Dear all, I am trying to find the PCs of a spatial data set (single variable). I want to calculate the PCs at each Lat-Lon location. The* 'princomp'* command gives the approximate standardized data (i.e* pca$scores*), stranded deviation ..etc. I tried* 'pca$loadings'*also, but it giving value 1 all time. Then I tried manually(without using* princomb*
2007 Apr 14
6
[LLVMdev] Regalloc Refactoring
On Thu, 12 Apr 2007, Fernando Magno Quintao Pereira wrote: >> I'm definitely interested in improving coalescing and it sounds like >> this would fall under that work. Do you have references to papers >> that talk about the various algorithms? > > Some suggestions: > > @InProceedings{Budimlic02, > AUTHOR = {Zoran Budimlic and Keith D. Cooper and Timothy