This will probably seem very simple to experienced R programmers:

I am doing a snp association analysis and am at the model-fitting stage. I
am using  the Stats package's  "drop1" with the following code:
##geno is the dataset
## the dependent variable (casectrln) is dichotomous and coded 0,1
##  rs743572_2 is one of the snps (which is coded 0,1,2 for the 3 genotypes)

library(stats)

modadd = glm(geno$casectrln ~rs743572_2 + factor(racegrp)+ factor(smokgp)+
factor(alcgp)+ factor(bmigp) + factor(ipssgp)
+ agebase, family="binomial")
drop1(mod,scale=0,test=c("Chisq"), x=NULL, k=2)

There is a great deal of missing data in this dataset for both snps and for
covariates--so I have been instructed not to simply drop all cases with
missing genotype or covariate data . How can I drop the observations which
are missing  only for the snp I am modeling at the time, then reinstate
those observations to model the next snp?

Thanks for any help,

Nora

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to