Comments (3)
Please send a reproducible example and I can look at it with you. In theory they shouldn't be off by an order of magnitude unless the genotyping (or imputation) quality is poor. We are using the same survival:::coxph.fit
internal function in this package so the estimators are the same. The only difference is that in gwasurvivr
we put in initial estimates that we obtain by fitting the model just the covariates first.
from gwasurvivr.
Thanks for your reply. I am sorry the data is in the server I cannot copy it.
Below are codes of two methods
-
R survival::coxph:
model <- coxph(Surv(age_onset,status) ~ cov_match[,28+i] +sex+pc1+pc2+pc3+pc4+pc5,data=cov_match,ties = "efron") -
gwasurvivr:
bed.file <- "data_clean/Two/cov_id.bed"
cov <- read.table("data_clean/Two/cov_match.txt",header=T)
sample.ids <- as.character(cov$merged_id)
plinkCoxSurv(bed.file=bed.file,
covariate.file=cov,
id.column="merged_id",
sample.ids=sample.ids,
time.to.event="age_onset",
event="status",
covariates=c("sex", "pc1","pc2","pc3","pc4","pc5"),
inter.term=NULL,
print.covs="only",
out.file= "/fs/project/PAS1501/gaolab/qldeng/Eden/data_clean/Two/result",
chunk.size=100,
maf.filter=0.01,
flip.dosage=TRUE,
verbose=TRUE,
clusterObj=cl)
I transferred bed file to 0/1/2 and it is contained in cov_match.txt used by cox.ph()
Also, I checked the source code of gwasurvivr and I did find that it uses coxph.fit() rather than coxph. Is there any difference? I find few manual about coxph.fit()
At last, you mentioned "The only difference is that in gwasurvivr we put in initial estimates that we obtain by fitting the model just the covariates first." When I use coxph() in R survial, is there anything I need to modify?
Thanks for your help!
from gwasurvivr.
Hi and thanks for your time!
Today I checked the sample data within the gwasurvivr package. The results of survival::coxph
and gwasurvivr match. Moreover, I find there's no difference if I set initial values for coxph.fit
, because both coxph
and coxph.fit
with initials gave me the same coefs. Is this possible?
At last, returning to my original problem, my data is case-only, that is, all subjects experienced the event. Is this a possible reason that two methods gave me different coefs?
Thank you!
from gwasurvivr.
Related Issues (20)
- Regarding to a function for PH assumption test and interpretation for resulting files
- Error in open.TabixFile(vcf) : 'indexname' must be character(1) HOT 1
- question about chunk.size HOT 4
- Flip dosage HOT 1
- Error in genotypes[!blankSNPs, cox.params$ids] : subscript out of bounds HOT 4
- No covariates and effect allele documentation HOT 3
- input format for gwasurvivr HOT 1
- question about "low variance" HOT 1
- On which allele the HR is calculated, depending on the flip.dosage option? HOT 3
- Error in genotypes[!blankSNPs, cox.params$ids] : subscript out of bounds
- number of SNPs analyzed in total is blank at the end of analysis HOT 4
- Error in genotypes[!blankSNPs, cox.params$ids] : subscript out of bounds HOT 1
- Error in plinkCoxSurv - could not find function "coxph.fit" HOT 12
- Error in rowMeans2(genotypes, na.rm = TRUE) : Argument 'dim.' must be an integer vector of length two. HOT 2
- The reference of the HR HOT 5
- Including 'cluster' in the coxph call HOT 1
- empty output file for SNP*covariate interaction HOT 3
- Allowing for interval survival time HOT 1
- MAF snps_removed is wrong HOT 2
- Error
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gwasurvivr.