search for: vcor

Displaying 2 results from an estimated 2 matches for "vcor".

Did you mean: cor
2003 Feb 19
1
getting/storing the name of an object passed to a function
...<- subset(x, group==fac.levels[1]) x2 <- subset(x, group==fac.levels[2]) s1 <- cov(x1) s2 <- cov(x2) cor1 <- cor(x1) cor2 <- cor(x2) n1 <- nrow(x1) n2 <- nrow(x2) n.vars <- ncol(x) V <- (1/(n1+n2-2))*(((n1-1)*s1)+((n2-1)*s2)) Vcor <- (1/(n1+n2-2))*(((n1-1)*cor1)+((n2-1)*cor2)) mu1 <- obj$means[1,] mu2 <- obj$means[2,] d2 <- mahalanobis(mu1, mu2, V) d <- sqrt(d2) t2 <- ((n1*n2)/(n1+n2)) * d2 F.stat <- ((n1 + n2 - ((n.vars)+1)) / ((n1 + n2 - 2) * (n.vars-1))) * t2 tmp <- list...
2002 Jan 15
1
acf conf intervals +speed
...-(t(d[(1+ii):nrow(d),]) %o% d[1:(nrow(d)-ii),]) / nrow(d) lam<-lam[1,,] vd<-vd+kern[ii+1]*(lam+t(lam)) vd<-vd/nrow(d) # Delta Method @ g<-matrix(0,3,1) g[1]<-1/(sqrt(mb*mc)) # Grad wrt a @ g[2]<-(-0.5)*(cor/mb) # Grad wrt b @ g[3]<-(-0.5)*(cor/mc) # Grad wrt c @ vcor<-t(g)%*%vd%*%g secor<-sqrt(vcor) list(cor=cor,secor=secor) } acf2<-function(x,y=x,lagmax=(length(x)-10),m="ACF",mix=0){ L<-min(length(x),length(y)) cormat<-matrix(0,lagmax,1) secormat<-matrix(0,lagmax,1) x<-x[1:L] y<-y[1:L] c0<-initc(x,y) cx0<...