Can you show sample data after the subsetting steps? Are you sure your subsetting steps are correct? it seems like you are getting not enough data points to get a trend.
Ideally, try to provide a proper REPRoducible EXample (reprex) illustrating your issue, that would make helping you much easier.