Solved – Trend test for ratios

binomial distributionrtrend

I have binomial data infected/not-infected on individuals of a sample from different years for two different infections.
I have used prop.trend.test to test for trend for each infection.

I want to test if there is a trend in the ratio of infected/not-infected between the two infections. Since a ratio could vary between 0 and ∞, what test is appropriate?

For testing trends in proportins, some have suggested glm with family binomial. Can i use glm with a different family?

What test can I use to prove there is an upward trend in time series of ratios assesment in R? suggests using the Cochran-Armitage test (which I think is the same as prop.trend.test) or logistic regression. Not sure if it is suitable in the case of ratios, though.

Best Answer

you may not need this answer anymore, but I'm doing a series of trend analyses I think are similar looking at rates of antibiotic resistance in different populations over time. I'm using prop.trend.test to proxy for Cochran-Armitage test (seems VERY similar if not exactly the same). This tests whether or not there is a significant trend, but doesn't speak to the shape.

To test the linearity and direction of the trend, you can use lm...since our rates vary over time I add a quadratic term (our trend is clearly non-linear). I'm using this format:

> fit<-lm(m$prop ~ m$score + I(m$score^2)) 

where prop are the proportions and score is a 1:n count by year. Allows you to test the linear and quadratic terms at once.

I'm following the methods used in a previous paper but working a bit blind; would like to hear if I'm wrong!

Best of luck.

Related Question