Question: R: How to test for trend of risk scores
1
gravatar for magda.meier
17 days ago by
magda.meier20
magda.meier20 wrote:

I have some case/control data like so (many more rows)

ID    score     phenotype
1     0.6482772         0
2     0.9519315         1
3     2.7689036         0
4     1.9974466         1
5     1.6287841         1
6     1.9993825         0

I performed a logistic regression on pheno~score to determine if an increase in scores leads to increased odds ratio (a measure of disease risk)

I now want to do a trend test in R to test whether there is trend. This trend test would just give me one odds ratio and a p-value. Does anyone know which R package or function I could use? I've looked around and I'm struggling to find a simple package that can help me do this.

Thanks

risk scores trend test R • 139 views
ADD COMMENTlink modified 13 days ago by Biostar ♦♦ 20 • written 17 days ago by magda.meier20
1

As phenotype is either 0 or 1 could you just do a fisher test as :

fisher.test(score,phenotype)

Could also be nice to plot the data as boxplots (x is the data.frame containing your data):

ggplot(x,aes(x=score,y=score))+geom_boxplot()
ADD REPLYlink modified 13 days ago • written 13 days ago by Nicolas Rosewick5.3k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1416 users visited in the last hour