Data from studies or processes with multiple observations over time. Econometrics is a typical topic where such data would be collected and analyzed. Proper analysis will take into account auto-correlation and cross-correlation.
Questions tagged [longitudinal]
262 questions
0
votes
1 answer
ggplot2 spaghetti plot connect datapoints
I want to visualize individual longitudinal data with a spaghetti plot using ggplot2.
My data looks like this:
ID task response timepoint
1 naming 15 1
1 naming 28 2
2 naming 8 1
2 naming 10 2
All…

Akoasma
- 11
- 5
0
votes
1 answer
Create longitudinal data from a list of igraph objects in R
I'm doing analysis on company networks in R and am trying to export my igraph results into a dataframe.
Here's a reproducible example:
library(igraph)
sample <- data.frame(ID = 1:8, org_ID = c(5,4,1,2,2,2,5,7), mon = c("199801",…

SteffenT
- 119
- 6
0
votes
0 answers
Is there a function to detect individual outliers in longitudinal data in R?
I have a dataset of 5,000 records and each of those records consists of a series of continuous measurements collected over a decade at various times. Each of the measurements was originally entered by manually and, as might be expected, there are a…

Vance L Albaugh
- 115
- 1
- 6
0
votes
1 answer
RStudio longitudinal model in symbols?
I ran a longitudinal model in RStudio looking at senior citizens and depression and am writing up the results, but my colleague and I disagree on how to interpret the model.
I have:
summary(lme.1<- lme(Depression ~ Memory+Gender+Age,…

iPlexpen
- 409
- 1
- 4
- 13
0
votes
1 answer
R command structure for Longitudinal data with level 1 and level 2 variables
I have children's test scores and demographics for different years (longitudinal data) and need to run a couple comparison models on it. I'm confused on how to set up the level 1 and level 2 variables in R.
My dataframe (df):
Student Year Gender…

iPlexpen
- 409
- 1
- 4
- 13
0
votes
1 answer
Wald Chi-Squared Test between two variable in one mixed effect model in r
I tried to finish a homework in longitudinal data analysis.
the question is to compare the difference in the cross-sectional and longitudinal effects of age (baseline cross-sectional:baseage, longtitudinal age: agechange) within a model.
the model…

Zhenyu Zhang
- 15
- 5
-1
votes
0 answers
Need help designing conv-lstm in TensorFlow for longitudinal disease prediction
I am currently trying to develop a conv-lstm to predict disease progression in eye photos of patients. I have a folder of images with a total of 263 images of 144 different patients. I also have an excel file that tells me if a patients ends up…
-1
votes
1 answer
How to group by ID numbers in dataset when running H2O automl
I'm using the H2O package for machine learning. The goal is to use my dataset to estimate new predicted ages for each participant in my dataset. My setup for the code was to get rid of all unnecessary columns in my dataset like sex, race, other…

anonymous
- 1
- 1
-1
votes
1 answer
calculating incidence of disease in R using start and end date and disease occurrence date
I have cohort study data with start and end dates for each patient. I would like to calculate the incidence of a disease in each year and each month from the first of January 2014 till the end of August 2021. How can I calculate person-months and…

abrar_r
- 55
- 5
-1
votes
2 answers
how to filter repeat data based on repeated id and time interval
I have longitudinal patient data in R. I would like to subset patients in the patid column based on this condition: three or more occurrences within one year period (one year= any 12 months period)
code to get the same table:
structure(list(patid =…

abrar_r
- 55
- 5
-1
votes
1 answer
how to filter repeat data based on repeated id and date
I have longitudinal patient data in R. I would like to subset patients in the patid column based on this condition: three or more occurrences within one year period (one year= any 12 months…

abrar_r
- 55
- 5
-1
votes
1 answer
creating a dummy variable based on dates for longitudinal data in R
I have longitudinal patient data in R. I would like to create the new_dummy variable just like I demonstrated in the table below. I would like the dummy_variable value to be 0 if the consultation_date variable is smaller than the registration_date…

abrar_r
- 55
- 5
-1
votes
1 answer
pandas select row if value in another column changs
Let's say I have a large data set that follows a similar structure:
where the id repeats multiple times. I would like to select any id where the value in column b changed with the desired output as such:
How might I be able to achieve that via…

r_user
- 317
- 3
- 11
-1
votes
1 answer
Comparing two visits in R
I have a data with three variables. Patient ID as ID, Visit as Visit, and a third variable as Var. I have two visits and I would like to subset the IDs:
IDs that have missing value of Var in the Visit 2
IDs had a value 2 for Var in the Visit 1 but…

AVA
- 81
- 4
-1
votes
2 answers
Can I match 2 data frames by a col, even if the data frames are of different length?
I am trying to combine 2 datasets of unequal length in a similar way to the example below for a longitudinal study. Dataset 1 includes each participant only once, with the row of data from their first weekly survey. Dataset 2 includes all surveys…

jenny9
- 43
- 7