Question
I am working with R to conduct statistical analysis. I have a dataset that is composed of about a thousand rows each of which consists
I am working with R to conduct statistical analysis. I have a dataset that is composed of about a thousand rows each of which consists of participant ID, outcome result of first test, outcome result of second test, and the time duration that elapsed between tests. For example:
Participant ID | Test Result 1 | Test Result 2 | Time Between Tests (in days) |
1 | 3.21 | 5.11 | 102 |
2 | 2.7 | 3.4 | 5400 |
3 | 4.2 | 6.4 | 21 |
The goal is for me to group the 1000 or so participants into groups on the basis of the time that was elapsed between their two test attempts (which varies between just a few days to thousands of days). The intent behind this is to then conduct correlational analysis between the different time-difference groups.
I have been advised that what I need to do is conduct a random walk on a latent variable through a statistical model:
1. This model includes a latent variable that is normally distributed
2. There is a set of cutpoints that need to be estimated, which needs to be done through an ordered logistic regression
3. The latent Gaussian variable for each participant follows an Ornstein-Uhlenbeck process, a Gaussian process with an exponential kernel.
What I have done so far is imported my data from Excel to R, wherein I now have a matrix of about 1000 rows (where each row is a participant) and 5 columns (participant ID, test score at time0, test score at time1, and the elapsed duration between tests (which is different for each participant).
Where I am stuck is how to now split this data into groups (that is get the set of cutpoints that needs to be estimated). In other words, my question is how to split my continuous variable of time between tests into groups and how to move forward from there?
Step by Step Solution
3.46 Rating (156 Votes )
There are 3 Steps involved in it
Step: 1
You could use a clustering algorithm to divide the participants into groups based on the time betwee...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started