Time dependent correlation/dependence

  • Context: Graduate 
  • Thread starter Thread starter Whenry
  • Start date Start date
  • Tags Tags
    Time Time dependent
Click For Summary
SUMMARY

This discussion focuses on analyzing time-dependent correlations between two categorical time series, A and B, over a century. The Chi-squared test indicates a rejection of independence, but when segmented into 10-year intervals, some segments show independence. The user suggests the potential influence of a third variable, C, and seeks guidance on incorporating interaction terms in logistic regression models. Recommendations include using R or MatLab for statistical analysis and creating datasets that reflect the interaction effects.

PREREQUISITES
  • Understanding of logistic regression models and interaction terms
  • Familiarity with statistical software such as R or MatLab
  • Knowledge of Chi-squared tests and their application in hypothesis testing
  • Basic concepts of time series analysis and segmentation
NEXT STEPS
  • Learn how to implement interaction terms in logistic regression using R
  • Explore the use of MatLab for statistical analysis of time series data
  • Investigate the application of Chi-squared tests in segmented time series
  • Research the capabilities of WinBUGS for complex logistic regression modeling
USEFUL FOR

Statisticians, data analysts, and researchers working with time series data, particularly those interested in exploring interaction effects in logistic regression models.

Whenry
Messages
22
Reaction score
0
How do I handle the following situation.

I have two time series, A and B. For the entire 100 yrs, we have P(A|B) ≠P(A), and Chi squared test leads us to reject the hypothesis of independence.

But, If I break the data down into 10 yr chucks, I find that for some 10 yr chucks P(A|B) = P(A).

So it seems maybe there is a third variable C, and I should be looking at P(A|B,C).

Similarly,

if I use regression on some data and find a significan relationship, for 100 yrs, of

Y = b_0 + b_1*x_1 + ε

but when I break down into 10 yr chucks, I find some years where we have

Y = b_0 + ε.

So it seems I should be looking at some interaction term :

Y = b_0 + b_1*x_1*α_1

but I have no idea what α_1 is...

Any suggestions as to how to handle this? resources that help explain how to proceed?

thank you,

Will
 
Physics news on Phys.org
Hey Whenry and welcome to the forums.

What statistical knowledge or experience do you have?

You could put your data into a statistical software package and calculate interaction effects.

From what you have described, you would add another variable which would correspond to your different intervals and then get some output on the interaction effects which you could use provided all the relevant assumptions are met.

How are you analyzing your data currently? What packages (if you are using any) are you using?
 
I am using MatLab. But I have used R as well and could use that if it would be a good tool.

I have a fairly good amount of numerical experience and dynamical systems experience, but my experience with statistics is not as strong...although I did have a year of grad level...I need practice, and stats vocab practice hah :-)

The variable A is categorical, 0 or 1, and so is B.

The linear model is similar, we are actually using a logistic function that gives us statistically significant b_0 and b_1 when calculated for all time. However, when I look at 10 yr chunks, and run a logistic fit, I will find y = b_0 + b_1*x, but b_1 is not significant and is near 0.

y = b_0 + b_1*x

My thought was, I could almost determine the interaction term numerically. For example, if i took the all time b_1, as the 'correct' or baseline b_1, I could then calculate b_1 for each 10 or 5 or 2 yr chunk, and then calculate my a_1...I could have a hint at least of what the a_1 term might look like.

y = b_0 + b_1*a_1*x1

If there are anythings you would recommend I do in MatLab and R, I would be very thankful

Will
 
If you are using R you could create a new dataset with the new "C" variable that sets the appropriate value for it depending on the time period.

Using this new data-set you can do some standard analysis to gauge interaction effects if any exist.

To me, that seems like the easiest way to do it. I am not familiar with other ways to do this. Maybe you could tell me specifically how you intended (or tried) to gauge the interaction effect numerically.
 
chiro, thank for your time and advice...

could you explain this a little more; especially in the context of logistic regression.

I have 50 yr time series where b_1 > 0 and statistically sig, p < 0.05

but for years 40 to 50 b_1 < 0 and stat sig.

So if I am trying to add an interaction term like so ; b_1*x_1(t)*C(t).

Now... to gauge interaction effects to assign values to C?

Will
 
Whenry said:
chiro, thank for your time and advice...

could you explain this a little more; especially in the context of logistic regression.

I have 50 yr time series where b_1 > 0 and statistically sig, p < 0.05

but for years 40 to 50 b_1 < 0 and stat sig.

So if I am trying to add an interaction term like so ; b_1*x_1(t)*C(t).

Now... to gauge interaction effects to assign values to C?

Will

I'm not exactly sure for the command to use in R for fitting a logistic regression model so maybe you can tell me what the command is for that. If it uses the lm command, then show me the syntax if you could please.

What you will have to do is after you create a new dataset with the right values for your C variable, is to simply modify the model to add your term involving C and the model fitting algorithm should take care of the rest as well as calculate all the interaction effects.

I know WinBUGS also allows you to state very complex models quite easily and let's you specify logistic regression very easily in the format you are talking about, so if you can't use R, you could end up using WinBUGS which is free to download.
 

Similar threads

  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 13 ·
Replies
13
Views
4K
  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 9 ·
Replies
9
Views
2K