search for: resr

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

Did you mean: res
2004 Jun 30
1
AS_NUMERIC and as.numeric - Could someone explain?
...of knowledge on R internals). I have four vectors a,b,c and z of size 10000 each. With these vectors I call .Call("hyp2f1forrey", a, b, b, z, PACKAGE = "hyp2f1") to access SEXP hyp2f1forrey(SEXP a, SEXP b, SEXP c, SEXP x) { int i,n; double *xa, *xb, *xc, *xx, *xresr, *xresi; SEXP resr, resi; n = LENGTH(a); PROTECT(a = AS_NUMERIC(a)); PROTECT(b = AS_NUMERIC(b)); PROTECT(c = AS_NUMERIC(c)); PROTECT(x = AS_NUMERIC(x)); PROTECT(resr = NEW_NUMERIC(n)); PROTECT(resi = NEW_NUMERIC(n)); xa = NUMERIC_POINTER(a); xb = NUMERIC_P...
2013 Feb 13
5
spearman correlation and p-value as a matrix
I have two data matrices that I want to make the correlation between each column from data1 and each column from data 2 and also calculate the p-value Matrices dont have the same size and I tried such a script. > bg <- read.table (file.choose(), header=T, row.names) > bg > Otu00022 Otu00029 Otu00039 Otu00042 Otu00101 Otu00105 Otu00125 Otu00131 Otu00137 Otu00155 Otu00158 Otu00172
2011 Jun 07
1
variable selection in linear regression
...at^2*ginv(t(X)%*%X) se <- sqrt(diag(cv)) pc <- matrix(0,nrow=1,ncol=d) resF <- matrix(0, nrow=n, ncol=d) pf <- matrix(0, nrow=1, ncol=d) for(j in 1:d){ pc[,j] <- cor(x=(x[,j]), y=(mydata[,1])) resF[,j] <- lsfit(x[,j], y)$residuals sseF <- t(as.matrix(apply(resF^2, 2, sum))) resR <- lm(y~1,data=mydata)$residuals sseR <- sum(resR^2) dfF <- n-2 dfR <- n-1 pf[,j] <- ((sseR-sseF[,j])/(dfR-dfF))/(sseF[,j]/dfF) max.pf=max(pf) max.pc=max(pc) Thank you and looking forward to hear some replies. Sincerely, Iba Universiti Putra Malaysia -- View this message...
2008 Dec 01
1
factanal question
Dear R users: I'm wondering if it's possible to get the residual correlation matrix when using factanal. Since factanal assumes that the errors are normally distributed and independent (provided the factor model fits the data) this would be useful. Of course you would need to submit the data to the function to get the residuals (not just their correlation matrix), but it should be possible