2
$\begingroup$

I want to identify the level of a predictive variable X (with Gaussian distribution) able to induce a reduction in a variable y (with Poisson distribution), that has been measured over the same population, several times per day and across several days.

Here is a dataframe I am using to think about it, I have been unable to grasp a sound strategy for analysis. One worrying issue that seems to appear is that the combination of these two variables leads to a scatter that might be confounded with a threshold imposed by x on y.

Would anybody have a suggestion to detect such a threshold reliably, should it exist?

     hour=rep(1:24,30)
     DOY=rep(1:30, each=24)
     x=rnorm(length(hour), mean=15, sd=3)
     y=rpois(length(hour), lambda=10)
     df=data.frame(y, x, hour, DOY)
     plot(y ~ x)
$\endgroup$
2
  • $\begingroup$ I would suggest a model such as: glmer(y ~ x + (1 | DOY), family = "poisson", data = df) $\endgroup$ Jun 23 at 19:27
  • $\begingroup$ Thanks a lot Robert, Do you think that would find the threshold? or simply tell me whether or not there is a significant change in Y due to X? I expect having daily series of Y in which some should be impacted by X and some should not. $\endgroup$ Jun 24 at 9:56
2
$\begingroup$

I would suggest a model such as:

glmer(y ~ x + (1 | DOY), family = "poisson")

Following comments on the question:

Do you think that would find the threshold?

When you say "find the threshold", all you can do is to fit a model which estimates this threshold (effect size). Once fitted you can assess the output as to whether the effect size is meaningful.

or simply tell me whether or not there is a significant change in Y due to X?

It will estimate the effect size. Then you can assess this as to whether it is meaningful or not. Since you mention "significant", if you compute a p-value this will tell you the probability of observing this effect size, or indeed a larger one, if in fact the effect size was zero.

If you want to be able to detect a particular effect size, at a given level of statistical significance, then you should do a power calculation which will inform you of the sample size you need.

$\endgroup$
1
  • $\begingroup$ Does this answer your question ? If so please consider marking it as the accepted answer. If not, please let us know why. Also, if you haven't already, please consider upvoting it. $\endgroup$ Jul 24 at 12:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.