# How to find the trend in binary time-series?

#### GACG

##### New Member
Hello everyone!

I have an event that can happen with each of my patients (Y or N), collected over many years. Theses patients are independent of each other. I want to detect the trend taking into account the binary nature of my variable but also the number of cases per year.

For example, I want to check if the ratio of Y/N over the years is increasing, but I have a variable number of cases per year (5-20 cases per year).
Would be chi-square any good?

I have seem some researchers using a Mann-Kendall Test, but I don't have any clues on how to apply it to a ratio derived from a binary event while taking into account the number of observations per year

In general, I have good knowledge of R programming and also I have access to SPSS v26.

Last edited:

#### hlsmith

##### Less is more. Stay pure. Stay poor.
Are you saying you only have 5-20 cases a year? How many patients do you have? If ishow up tomorrow and i am a no, is that the only time i am in the data dataset?

Can you provide some context, so i can understand the scenario a little better. What is the outcome? Not knowing it opens the door to us missing something important.

#### GACG

##### New Member
Yes, I have a total of 18 years with aprox. 240 patients. Each patient have a status of a specific binary outcome at the time it arrives in the hospital. I'm trying to analyze if this positive outcome (1) has an increase over time compared to the negative outcome (0). For example presense or ausence of hipertension in people with kidney problems.
We collected all the cases over those years from the same tertiary hospital

I've done some chi-square and logistic regression with grouped years (3 years each group), but logistic regression does not accept ordinal categorical values as independent variables (group of years), but I used the values in grouped years as a numerical value (1,2,3,4,5 and 6)

Last edited: