Displaying 2 results from an estimated 2 matches for "sib2".
Did you mean:
sdb2
2007 Oct 11
1
constraining correlations
...how constrain all the sibling correlations (twin-sib and sib-sib)
to be the same while allowing the twin-twin correlation to be
different. Here is some simulated code:
set.seed(5)
famdata <- matrix(rnorm(400),ncol=4,dimnames=list(NULL,c("Twin1","Twin2","Sib1","Sib2")))
famdata[runif(100)<.2,3] <- NA #20% of sib 1s are missing
famdata[runif(100)<.4,4] <- NA #40% of sib 2s are missing
cor(famdata,use="pairwise.complete")
<R output>
Twin1 Twin2 Sib1 Sib2
Twin1 1.00000 0.12027 0.02286 -0.10578
Tw...
2007 Oct 30
0
Plotting question: how to plot SNP location data?
...from above (z) and
include the exact locations of each SNP. Is it possible to do that using
the image-function? Below I have tried to solve the problem using the
basic plot function but I cannot include the colors to that plot. How
would that be possible?
colnames(z) <- c("sib1","sib2","sib3","sib4")
rownames(z) <- paste(rep("SNP", 20), 1:20)
z.t <- t(z)
#snploc$location represents the location of the SNP in the chromosome
snploc <- data.frame(SNP=paste(rep("SNP", 20), 1:20),
location=c(4.2,5.8,6.9,3,8,7,5,4,3.6,4.3,4.6,6.6,...