search for: nsnp

Displaying 3 results from an estimated 3 matches for "nsnp".

Did you mean: ns_p
2010 Aug 31
1
any statement equals to 'goto'?
I have the following code: ----------------------------------------------------------------------------------------------------- result <- matrix(NA, nrow=1, ncol=5) for(i in 1:(nsnp-1)) { for(j in (i+1):nsnp){ tempsnp1 <- data.lme[,i] tempsnp2 <- data.lme[,j] fm1 <- lme(trait~sex+age+rmtemp.b+fc+tempsnp1+tempsnp2+tempsnp1*tempsnp2, random=~1|famid, na.action=na.omit) fm2 <- lme(trait~sex+age+rmtemp.b+fc+tempsnp1+tempsnp2, random=~1|famid, na.action=na.omit) resul...
2010 Jul 16
2
a issue about the qutation mark?
...t') # line 2 load('imge.RData') # line3 imge <- imge[,-c(3)] # line4 imge <- imge[complete.cases(imge),] # line5 trait<- read.csv(trait.file) # line6 ngenes <- nrow(imge) # line7 nsnp <- nrow(trait) #line 8 for(i in 1:ngenes) { for(j in 1:nsnp) { if(imge$d1[i]==trait$d1[j] & imge$d2[i]==trait$d2[j]) trait$imgene2[j] <- imge$Gene[i] else trait$imgene2[j] <- NA } } return(trait) } hypertension <- funcname(&q...
2010 Oct 31
1
R-help Digest, Vol 92, Issue 31
...weighted cox ph model, with possible haplotype configurations for each subject weighted by their posterior probabilities given genotype data. Are your markers SNPs? If so you can use a utility function from the hapassoc package to get started. For example, if your data is in a dataframe dat, with nsnp SNPs in the last nsnps columns, you could create an augmented data frame (augmented by pseudo-individuals for each subject with ambiguous phase) with library(hapassoc) ph<-pre.hapassoc(dat,nsnps) augdat<-cbind(ph$nonHaploDM,ph$haploDM) wts<-ph$wt and then use coxph with augdat as the dat...