search for: na1

Displaying 13 results from an estimated 13 matches for "na1".

Did you mean: a1
2003 May 08
1
A problem in a glm model
Hallo all, I have the following glm model: f1 <- as.formula(paste("factor(y.fondi)~", "flgsess + segmeta2 + udm + zona.geo + ultimo.prod.", "+flg.a2 + flg.d.na2 + flg.v2 + flg.cc2", " +(flg.a1 + flg.d.na1 + flg.v1 + flg.cc1)^2", " + flg.a2:flg.d.na2 + flg.a2:flg.v2 + flg.a2:flg.cc2", " + flg.d.na2:flg.v2 + flg.v2:flg.cc2", sep="")) g1 <- glm(f1,family=binomial,data=camp.lavoro.meno.na) The variables are all...
2008 Jun 12
1
About Mcneil Hanley test for a portion of AUC!
...unction cROC. I can only find the value of "r" for the whole AUC's . > seROC<-function(AUC,na,nn){ > a<-AUC > q1<-a/(2-a) > q2<-(2*a^2)/(1+a) > se<-sqrt((a*(1-a)+(na-1)*(q1-a^2)+(nn-1)*(q2-a^2))/(nn*na)) > se > } > > cROC<-function(AUC1,na1,nn1,AUC2,na2,nn2,r){ > se1<-seROC(AUC1,na1,nn1) > se2<-seROC(AUC2,na2,nn2) > > sed<-sqrt(se1^2+se2^2-2*r*se1*se2) > zad<-(AUC1-AUC2)/sed > p<-dnorm(zad) > a<-list(zad,p) > a Could somebody kindly suggest me how to calculate the value of "r" or so...
2006 Mar 15
1
How to compare areas under ROC curves calculated with ROCR package
...AUC. I used the following program I found on R-help archives : From: Bernardo Rangel Tura Date: Thu 16 Dec 2004 - 07:30:37 EST seROC<-function(AUC,na,nn){ a<-AUC q1<-a/(2-a) q2<-(2*a^2)/(1+a) se<-sqrt((a*(1-a)+(na-1)*(q1-a^2)+(nn-1)*(q2-a^2))/(nn*na)) se } cROC<-function(AUC1,na1,nn1,AUC2,na2,nn2,r){ se1<-seROC(AUC1,na1,nn1) se2<-seROC(AUC2,na2,nn2) sed<-sqrt(se1^2+se2^2-2*r*se1*se2) zad<-(AUC1-AUC2)/sed p<-dnorm(zad) a<-list(zad,p) a } The author of this script says: "The first function (seROC) calculate the standard error of ROC curve, the second...
2006 Mar 20
1
How to compare areas under ROC curves calculated with ROC R package
...AUC. I used the following program I found on R-help archives : From: Bernardo Rangel Tura Date: Thu 16 Dec 2004 - 07:30:37 EST seROC<-function(AUC,na,nn){ a<-AUC q1<-a/(2-a) q2<-(2*a^2)/(1+a) se<-sqrt((a*(1-a)+(na-1)*(q1-a^2)+(nn-1)*(q2-a^2))/(nn*na)) se } cROC<-function(AUC1,na1,nn1,AUC2,na2,nn2,r){ se1<-seROC(AUC1,na1,nn1) se2<-seROC(AUC2,na2,nn2) sed<-sqrt(se1^2+se2^2-2*r*se1*se2) zad<-(AUC1-AUC2)/sed p<-dnorm(zad) a<-list(zad,p) a } The author of this script says: "The first function (seROC) calculate the standard error of ROC curve, the second...
2006 Oct 15
1
how can i compute the average of three blocks for each column ?
...layout$Block==1,] block2=fg1[layout$Block==1,] average=(block1+block2+block3)/3 but it did not work. ################## How can i calculate the means of remaining x_variables? ######### Read data for the remaining slides =x2,x3,x4,x5 ########### for (i in 2:num.slides){ na1 <- strsplit(na[[i]][k],".txt") na2 <- strsplit(na1[[1]][1],"-") bat=na2[[1]][1] sli=na2[[1]][2] nslide <- cbind(nslide,as.numeric(sli)) # nslide is a vector giving the number of the slide in the batch # read table of data for this slide a<-read.table(fi...
2006 May 04
2
do.call in 2.3.0 vers 2.3.x
...a bit of work to check this in all my code. Dieter ------ wby = by(warpbreaks[, 1:2], warpbreaks$tension, function(x) { data.frame(breaks=mean(x$breaks),var=var(x$breaks)) } ) cd = do.call("rbind",wby) row.names(cd) cd ---- Output in 2.3.0 > row.names(cd) [1] NA "NA1" "NA2" > cd Error in data.frame(breaks = c("36.38889", "26.38889", "21.66667"), var = c("270.48693", : row names contain missing values > ---- platform i386-pc-mingw32 arch i386 os mingw32 system...
2009 Oct 28
1
need help explain the routine input parameters for seROC and cROC found in the R archive
...vance. > From: Bernardo Rangel Tura > Date: Thu 16 Dec 2004 - 07:30:37 EST > > seROC<-function(AUC,na,nn){ > a<-AUC > q1<-a/(2-a) > q2<-(2*a^2)/(1+a) > se<-sqrt((a*(1-a)+(na-1)*(q1-a^2)+(nn-1)*(q2-a^2))/(nn*na)) > se > } > > cROC<-function(AUC1,na1,nn1,AUC2,na2,nn2,r){ > se1<-seROC(AUC1,na1,nn1) > se2<-seROC(AUC2,na2,nn2) > > sed<-sqrt(se1^2+se2^2-2*r*se1*se2) > zad<-(AUC1-AUC2)/sed > p<-dnorm(zad) > a<-list(zad,p) > a > } > -- Waverley @ Palo Alto
2006 Apr 27
1
difference in rbind() [print?] behavior between 2.2.1 and 2.3.0
...that the error is actually in the print method. > d <- do.call("rbind", b) > d Error in data.frame(a = c("1", "1"), b = c("2", "2"), check.names = FALSE, : row names contain missing values But: > d[1:2, ] a b NA 1 2 NA1 1 2 > I'm not sure those are the intended row names but I'm not sure. The following does seem to work as I would have expected: > b <- list(x = data.frame(a = 1:2, b = 2:3), y = data.frame(a = 1:2, b = 2:3)) > do.call("rbind", b) a b x.1 1 2 x.2 2 3 y.1 1...
2006 May 03
1
Vector searching and counting speed optimization
...;- test$loc4.a1 a2 <- test$loc4.a2 nvec <- table(pop) a <- "3" with.a <- a1 == a | a2 == a allele.stats <- sapply(names(nvec), function(p) { this.pop <- pop == p & with.a a.in.a1 <- a1[this.pop] == a a.in.a2 <- a2[this.pop] == a na1 <- length(a.in.a1[a.in.a1]) na2 <- length(a.in.a2[a.in.a2]) p.a <- (na1 + na2) / nvec[p] / 2 is.het <- a1[this.pop] != a2[this.pop] p.het.a <- length(is.het[is.het]) / nvec[p] c(p.a, p.het.a) }) -- Eric Archer, Ph.D. NOAA-SWFSC 8604 La Jolla Shore...
2004 Dec 15
3
(no subject)
Dear R-helper, I would like to compare the AUC of two logistic regression models (same population). Is it possible with R ? Thank you Roman Rouzier [[alternative HTML version deleted]]
2003 Apr 14
1
NA in logical vector = data frame row numbers scrambled
...nrows) { : missing value where logical needed the problem is in logical vector having NA > test$plyndp<520 [1] NA FALSE FALSE FALSE NA TRUE and subsequent scrambled row numbering > test[test$plyndp<520,7:9] zatizdp plyndp skalice NA NA NA NA NA1 NA NA NA X10 107.1585 518.3881 5.98037 Is there some more simple or direct way how to achieve this > test[complete.cases(test),][na.omit(test$plyn<530),] index cislo time den hod min zatizdp plyndp skalice 10 10 1 37693.84 13 20 15 107.1585 518.3881 5.98...
2002 Apr 30
3
rbind'ing empty rows in dataframes in 1.4.1 versus 1.5.0
Hi, In 1.4.1, I was able to create extra "empty" rows in a dataframe as so: > x <- data.frame(a = letters[1:3], b = 1:3) > x a b 1 a 1 2 b 2 3 c 3 > x[4,] a b NA NA NA > rbind(x, x[4,]) a b 1 a 1 2 b 2 3 c 3 NA NA NA > R.version _ platform sparc-sun-solaris2.6 arch sparc os solaris2.6
2007 Jul 24
3
Quota plugin, Maildir, dict backend loop problem
...t582670292", 10) = 10 setsockopt(9, SOL_SOCKET, SO_RCVTIMEO, "\2003\341\1\0\0\0\0", 8) = 0 read(9, "\5\0\0\5", 4) = 4 read(9, "\376\0\0\2\0", 5) = 5 write(20, "O582670292\n", 11) = 11 read(10, "B1\nA1\tpriv/quota/storage\t-24324\n"..., 4043) = 35 fcntl64(9, F_SETFL, O_RDWR|O_NONBLOCK) = 0 read(9, 0x9271eb8, 8192) = -1 EAGAIN (Resource temporarily unavailable) fcntl64(9, F_SETFL, O_RDWR) = 0 setsockopt(9, SOL_SOCKET, SO_SNDTIMEO, "\2003\341\1\0\0\0\0", 8...