Quadratic polynomial - how to test correlation between x and y?

#1
Hi all,

I have one dependent variable (fish abundance) and one independet variable (time), both continuous. I would like to test the correlation between them because I expect that the abudance changes over time due to contextual factors. Analysing a ggplot using the "loess"method, I concluded that the two variables seems to have a quadratic polynomial behaviour. I would like to test the correlation between these two variables, but I don't know how to do that. I know that spearman is not an option (because the curve goes down and then up). I tried to use a nls model, which worked for making the curve, but I couldn't find any output (value) regarding the association between the two variables. I looked for a specific test, but I couldn't find. I read about the option of using a GAM and I tried it, but I'm not sure if I may use a GAM having only one indepent variable (since I always see GAMs with multiple variables, and looks like the model was created for that). Could I? If so, is the "deviance" on the GAM output an indicative of the relationship between the two variables? (something similar to the R2 for the linear relationships?)

Thank you very much in advance for your time.
 
Last edited:

Dason

Ambassador to the humans
#2
"I would like to test the correlation between these two variables"

Let's take a step back. Why do you want to test the correlation? What is it that you're hoping to show? That the variables are related? What is your research question here?
 
#3
Thanks, Dason, I've just edited my question in order to clarify this point. I believe the two variables are correlated because I expect that the abundance changes over time due to contextual factors. That's why I would like to test the correlation between the two variables.