# Questions tagged [time-varying-covariate]

A variable that records something about a study unit in a longitudinal study that changes over the course of the study.

288 questions
Filter by
Sorted by
Tagged with
1 vote
8 views

### Scientific reporting of time-varying covariates at different time frequencies

Say I have the following model: $$y_{it} = \gamma_i + \delta {T}_{it} + \zeta Z_{i(k)} + \epsilon_{it}$$ where $y$ is some outcome for household $i$ in month $t$. $\gamma_i$ denotes household fixed ...
• 5,057
32 views

### What could cause regression linear models to predict exactly the mean of train set while random forests perform worse?

Data set: I'm working on a linear regression problem where my train set $X$ is of shape $(703 557, 53)$. Each row is a client's features, which could be its age, its gender, how many calls we received ...
• 155
13 views

### Time-Varying Covariates in a Cause-Specific Hazard Regression

I'm estimating a cause-specific hazard function using the coxph() function in R. This the first time I've run such an estimation. In performing model diagnostics, ...
• 43
16 views

### Should the N events that is output by coxph when using counting process format be the same as the N events prior to reformating?

I am performing a coxph analysis using time dependent and time independent covariates. I have formatted my data into the counting process form to allow for time dependent covariate. Prior to changing ...
1 vote
17 views

### Would this be an appropriate way of handling internal time-dependent covariates when fitting a survival model?

By definition, internal covariates 'exist' or can be recorded as long as the study participant is alive. Let's say we have an internal covariate that is continuous in nature. Given that, would ...
1 vote
41 views

### What could be possible reasons for sex to become a time-varying covariate?

I was fitting a Cox PH model with BMI as the main predictor, time to death as outcome, and age, sex, blood pressure, heart rate, cholesterol, smoking status, diabetes and use of antihypertensive ...
16 views

### How to enter time variable into a tvLM() model?

I would like to know if the effect of a predictor varies over time. So for example if the effect of "pred" on "dv" changes over the course of the "time" variable. ...
• 1,641
11 views

### Is duration of treatment effect a classic mediator variable in a causal diagram?

My team is drawing up a causal diagram for a retrospective study to estimate the treatment effect (ATT) of home health nursing on patients with multiple chronic health conditions: where we have A = ...
• 4,504
32 views

### Joint models vs. Cox regression for strictly increasing time-dependent variable

A methodological question without data attached. I've been looking into applying joint models to survival analysis with time-dependent variables. Mainly I've been reading about Dr. Rizopoulos JM ...
• 31
47 views

### Conditional survival function in landmark analysis

In H.Putter & H.C. van Houwelingen's paper "Understanding Landmarking and Its Relation with Time-Dependent Cox Regression" the authors state that the conditional survival function, given ...
• 3
13 views

### How to model multi-year data with group-level outcomes and time-varying groups

I'm working with a four-year dataset of around 150 individuals. In each period, an individual may choose to compete in a contest (submit an application) and, if they do, apply individually or as a ...
• 101
665 views

### Statistical learning when observations are not iid

As far as I am concerned, statistical/machine learning algorithms always suppose that data are independent and identically distributed ($iid$). My question is: what can we do when this assumption is ...
• 352
44 views

### longitudinal data modeling with exposure

I am very new to statistics and longitudinal analysis, so this question may sound very basic. Consider a dataset where outcome(y) is a binary variable [wheezing , yes/no]. Each child is exposed to ...
17 views

### Using time predictor with a nominal predictor for a continous / metric outcome

I want to do a multivariate regression to infer the total causal effect with the below dag. Where X is a categorical/nominal variable with ...
5 views

### Accounting for time effects with time covariates vs. instrumental variables or other alternatives

I have sales data where I expect some structure in time due to inflation, market changes, etc. I am not a statistician by training, but I am aware of the issues that this presents and the technique of ...
• 321
1 vote
23 views

### How to model the likelihood of multiple binary outcomes occurring after an event?

Wanting to know if 3-5 binary outcomes are more likely to occur after an event. For example, are people who experience the event more likely to experience an outcome (within a year or 6 months, etc.) ...
30 views

### How to simulate a time dependent variable on a existing dataset?

I made a coursera course abouth survival analysis. It uses a heart failure dataset for the examples. (That same dataset can be found on Kaggle https://www.kaggle.com/jackleenrasmybareh/heart-failure) ...
• 101
6 views

### varying coefficient models parameters and estimation first principles

Please could someone explain in lay terms how the varying coefficient model works? The generalised form looks like eigenvectors. I am unsure why there is Xb(U-u) and K(U - u) and what these are used ...
• 73
1 vote
33 views

### Correct way to add both time-varying and time-invariant predictors in coxph()

I have time-varying and time-invariant predictors in my cox model. What will be the correct way to add both of them using coxph()? In my model, income, development, ...
• 155
1 vote
43 views

### When reporting the results of a time-varying covariate Cox model, are cumulative hazard rates more "accurate" than survival estimates?

I am using a time-varying covariate to represent subjects that can enter and leave groups at arbitrary times. Because group membership is not fixed, I posit that the true time-to-event is more ...
• 1,743
81 views

### How to specify subject ID when using flexsurvreg to fit data with time-varying covariates

We are trying to use the R function flexsurv::flexsurvreg to fit data with time-varying covariates. The survival::coxph function has an 'id' argument that provides a means for specifying what the ...
• 1
14 views

### Modelling of time-varying predictors in multilevel growth models in R

I am interested in the modelling of time-varying predictors in a multilevel growth model in R. Specifically, I am working with three-level data (measures collected across four timepoints (0,12,18,24 ...
1 vote
48 views

### How would I go about predicting the survival probability or regress the survival date/time of an entity in a dataset?

I have a longitudinal dataset comprising of physicians and their time independent covariates (age group, physician type, etc) and time dependent covariates (number of patients, hours worked, etc). I ...
• 179
1 vote
416 views

### Predicting survival/event probability with multi-level Weibull model and time-dependent covariates

I am still a beginner when it comes to survival analysis. I have fitted a parametric (Weibull) survival regression model with time-dependent covariates using the R package flexsurv via: ...
• 25
89 views

### Test whether two samples have different modes?

I have a dataset with timed observations of an event across the day, in two different places. I am particularly interested in whether the peak in observation is significantly different between the two ...
• 437
161 views

### Regression analysis in interval censoring with time-varying covariates

This question is a follow up to the other one asked by someone else (Right censored survival analysis with interval data in R) and this one by me Left censoring with time-varying covariates I have ...
• 358
28 views

### Estimating duration of temporary exogenous predictor cox proportional hazard model

I have time-to-event survival data (ie., start, end, fate [death or censor] for each known individual). I am looking to model survival for a population of animals that are released onto a new ...
14 views

### Model effect of treatment when outcome varies by time

I am trying to compare the effect of treatment in a small crossover design. A machine provides 50 measurements over a period of time. it's continuous data. We now time has an effect on the measurement....
• 21
1 vote
129 views

### R Cox regression with cumulative time dependent covariate - variable coding

I would be grateful for your help regarding the correct coding of cumulative time dependent covariates in cox regression. I am exploring the association of injections (exposure, same dose for all ...
• 13
231 views

### Left censoring with time-varying covariates

I have a data with some participants entering the study with a disease of interest already present. For others, I have several points of observation where different factors were measured (such as ...
• 358
151 views

### (Consistent) Feature Selection Over Time

Let us assume the following simple scenario: Your goal is to forecast the sales figures of different companies. You assume that the sales figures are determined by company-specific characteristics (...
• 93
109 views

### Mixed model with time-varying covariate and interaction

In my current research (randomised, placebo control trial) I'm investigating an effect of two interventions (Intervention 1 - low dose of dietary supplement, Intervention 2 - high dose of dietary ...
• 11
67 views

### Linear Mixed Model with Date Covariate and Missing Values

Let us consider the table below, which contains (a sample of) the sale prices of different properties in successive years (not all properties are sold each year): ...
• 268
644 views

### Testing the validity of a Cox Time-Varying regression model in Python Lifelines

Using the lifelines library for python, I've fitted a Cox Time-varying regression to some customer data, to see which coefficients have an effect on customer churn. The dataset is a combination of ...
53 views

### Cox regression - proportional hazards - time to event variable in database with one line per individual per year

I have a question regarding my Time to Event variable. Since I am working with time-varying variables (which can change every year), I use a data structure with one line per individual per year. ...
1 vote
43 views

### How to interpret the coefficients in a time varying linear regression model?

How do I interpret the coefficients in a time varying linear regression model (in particular theta2). Formula from the book “Dynamic Linear Models with R” As I understand, at time t theta2 is the ...
• 11
1 vote
247 views

### Can coxph() from the R survival package be used to fit bidirectional multistate survival models

I am trying to design an illness-death multistate model (see image below) for survival type data in R. This data is more suited for a Markov model, but the investigator I am working with prefers to ...
• 43
15 views

### Zero Mean assumption in theory but not in practice?

The paper "Network Inference via the Time-Varying Graphical Lasso" by David Hallac, Youngsuk Park, Stephen Boyd, Jure Leskovec shows how a (time varying) covariance matrix can be shrunk in ...
• 67
1 vote
55 views

### Assessing covariate balancing with longitudinal data

When assessing balance over covariates with cross-sectional data, one can use the standardized mean difference, i.e. the difference in mean for a given covariate among the treated and untreated groups ...
• 187
141 views

### Cox PH non-proportionality: time-dependent variable?

I am performing Cox regression modelling, searching for predictors for various clinical outcomes. Now, based on Schoenfeld residuals test, some of my binary predictors have p-value <0.05 with ...
• 11
144 views

### Why conditioning on past treatment in IPTW with time-varying treatments?

Inverse probability weights with time-varying treatments $A_t$ and confounders $L_t$ are defined as the inverse probability of being treated at time $t$ conditional on past treatment and covariate ...
• 187
1 vote
31 views

### Depicting effect of time-varying covariate in proportional hazards regression by comparing survival curves for specific individuals

I have an dataset in which a time-varying covariate has a strong effect on subsequent risk. I would like to "illustrate" this effect by comparing the estimated survival curve for a typical ...
65 views

### Survival Analysis for data with repeated measures

I am trying to study attrition amongst students during their 3 year bachelor's degree. If I measure values of various features every semester over a 3 year period (or any other frequency), only some ...
• 547
39 views

### Why do we need to have the untransformed variable in addition to the time-transformed variable in a Cox model?

For example in the veteran dataset, vfit <- coxph(Surv(time, status) ~ trt + prior + karno, veteran) ...
• 13
40 views

### Cox mode: PH violated because of multiple covariates

I have a cox model as follows, comparing survival of 5 subgroups (one is always a reference). Data is relatively large as n = 12 000; however, the sizes of the subgroups range from 60 to 9000 subjects....
• 1,533
58 views

### How to describe time-varying covariates by group (averages)?

I want to start my survival analysis with some descriptive work of my variables. I have an unbalanced survival dataset with time-fixed and time-varying covariates. I want to compare those covariate ...
22 views

### Time Series Classification with Unequal Time Between Events and Number

I have a problem where I'd like to predict whether a customer is going to convert. I have event data for these customers over time and the histogram for time to conversion follows a 1/x pattern where ...
37 views

### Survival Analysis and covariates

I have a question concerning survival analysis and how/whether one needs to incorporate time-varying covariates (at all). Example - Time to tenure (earning PhD is time origin) and for example I want ...
83 views

### Include step function into Joint longitudinal and time to event model

I am fitting a joint longitudinal and time to event model on production data with the aim of making dynamic predictions of the time of assembly of a machine. I am using JMbayes R package. Among the ...
• 85
1 vote