Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

0
votes
0answers
6 views

Cox Model with time-varying covariates in mlr

I am using the mlr package in R to perform survival analysis. mlr includes the Cox Proportional Hazards Model (function coxph from library survival) as one of its integrated learners. As I understand ...
0
votes
0answers
6 views

How to model change in independent variable for Cox Proportional Hazards Model?

I'm interested in calculating a time to event model (Cox Proportional Hazards Model) and one of my independent variables has multiple measurements. I'm planning on using a time varying covariate for ...
3
votes
1answer
39 views

Time dependent variable in survival analysis using Cox regression

Trying to determine how to analyse a time dependent variable (rainfall) in a survival analysis. Two rows of example data for animal A and animal B as below: Each value next to the animal represents ...
1
vote
0answers
18 views

How to validate(with sample-split data) and calibrate Cox model with time-dependent covaraites?

I am building 2 cox models: Without time-dependent covariates With time-dependent covariates. 1.The first model (without time-dependent variables) as specified below in R works fine and I have no ...
1
vote
0answers
17 views

Time dependent variable (daily rainfall) in a cox survival analysis

I'm trying to analyse the effect of rainfall (a time dependent variable) on animal survival. In order for an animal to be measured as 'survived' in my study it needs to be found for a minimal period ...
0
votes
0answers
18 views

Predict malfunctionings with classifiers trained on truncated data?

I have an historical data-set of machines malfunctionings. I have data from different sensors, and a response variable of malfunctioning or not (1/0). I have difficulties in creating a classifier ...
0
votes
1answer
20 views

Survival Analysis Time Dependent Variables

I am currently learning Survival Analysis for a project and I struggle a bit with the notion of Time-Dependent Covariates. Let's take the following example: I would like to know what is the ...
0
votes
0answers
32 views

How to estimate changepoint from Cox survival model with time-varying effects?

I'm wondering the best way to model the duration of time to a changepoint in survival within a known-fate, continuous time survival model (as well as estimate survival rate before and after the ...
1
vote
0answers
24 views

How is exchangeability related to covariate shift?

I understand that exchangeability refers to the notion that the order of data in a sequence does not affect the joint distribution of that data. In a sense, the current data we possess is from the ...
1
vote
1answer
37 views

Piecewise survival analysis?

I am trying to analyze time-to-event data (time to completion of a task). Looking at the KM curves, there is a distinct behavioral change around 12 months. This makes sense, because at 12 months there ...
1
vote
1answer
101 views

Repeated measures mixed model correlation between measurements

I am interested in looking at the correlation between two types of heart function measurements over time. test1 can be considered the true value. The true value (<...
0
votes
1answer
35 views

Survival Analysis on recurrent behavior time series predictor

We are trying to build a credit model to predict the default time (or finally closed the loans as censored). The predictor is a high-dimension time series of current observed previous payment behavior....
0
votes
1answer
82 views

Fitting a time-varying coefficient model in python [closed]

I have some data that varies with time and some that stays constant (e.g., location, race stay constant). Is it possible to implement a mixed time-varying coefficient model in python? What I mean is:...
0
votes
0answers
23 views

Cumulative Incidence Plots - Weibull Model - Time Dependent Covariates

I am seeking to create a Cumulative Incidence Plot for a Weibull model with baseline and time-varying covariates. I am using SAS PROC LIFEREG to for this model but there are two issues-one of which is ...
0
votes
0answers
39 views

generalized additive model with nonstaionary dependent variable (time-series analysis)

I am trying to use gam model to analyze pm2.5 effect on death. However, the dependent variable 'death number' is not stationary. (the data is Time Series data) What I know is for Time Series data I ...
0
votes
0answers
8 views

Making use of time intervals in computing conditional probabilities in sequential data with time

I have sequential data X and a binary target y (which is the last event in the sequence). Each row represents a unique sequence of events with a label, 0 or 1. Potentially, I need to estimate a ...
0
votes
1answer
72 views
3
votes
0answers
27 views

What plots and summary statistics are usually used for exploratory data analysis of multivariate time series?

For multivariate cross-sectional data, tools such as scatterplot matrices, the five numbers summary, faceted boxplots and so on, allow an efficient exploration of a new data set, and can suggest how ...
0
votes
0answers
31 views

Cox proportional hazards model with interval-censored data and time-dependent variables in R

My question is pretty clear. I am doing a survival analysis on data that is interval censored (i measure death at 7 year intervals), and I have time dependant covariables. After reading online, ...
0
votes
0answers
22 views

How to make predictions and subsequently validate the model using Cox time varying model using the lifelines library?

So, I am using this library to model the risk of customers unsubscribing to a service (with unsubscribed meaning event happened and subscribed meaning no event). This is the link to the lifelines ...
0
votes
0answers
21 views

Analyzing latent time invariant predictors and time variant outcome variable

I have 5 time invariant manifest variables that load onto 2 latent variables: l1 =~ x1+ x2 + x3 and l2 =~ x4 + x5 and one time ...
0
votes
0answers
48 views

Why are Weibull Results Different in R than in Stata?

I'm working with a time-series dataset that looks like the following: I want to run a survival model with a weibull parametrization, but I'm getting different results in Stata and in R. In Stata, ...
0
votes
0answers
18 views

Restricting Cox regression with time-varying covariate to specific calendar-time period only

I am analysing a cohort of individuals. These individuals are followed until death, emigration or end of the follow-up period. I am investigating the effect of a time-varying exposure (influenza-...
0
votes
1answer
94 views

Using SVM and Logistic Regression for survival analysis

I am trying to use SVM and Logistic Regression for survival analysis but I am not able to properly find the implementation in R or python? I was wondering if it was possible to predict whether a ...
1
vote
0answers
3 views

How Rain fall data series adjusted with % irrigated area in the locality in turn calculate production risk

I want to calculate the production risk based on rain fall data, both the variable is of time series data. we have % irrigated area also. if rain fall less area may be a irrigation by means of canal ...
1
vote
0answers
72 views

clearing up my thinking on longitudinal methods in applied machine learning

Although my graduate training is in econometrics (ABD FTW!), I spent a few years doing more heavily IT-related work before -- now -- transitioning to a data science-y role. Questions about using ...
0
votes
0answers
22 views

How to disentangle uniform scaling and time-series effects?

I have many fluorescence microscopy images of a living specimen, taken at varying microscopy settings (laser intensity, exposure). In order to compare the images to each other, I want to normalise ...
3
votes
2answers
108 views

Predicting recidivism for male prisoners [closed]

The following question takes ground in the this example with time varying covariates. The following code will read data from a url, parse it to the right format (allowing for time varying covariates) ...
1
vote
0answers
28 views

Has a distribution changed over time (by category)

I have information on percentage spending on 5 household categories (food, clothing, shelter, entertainment, education & sport, other) for all families in a county in 2005. I have the same ...
2
votes
0answers
58 views

Predictive model with time-dependent predictors

I am working on a project to predict whether undergraduate students will return for their 2nd semester. I would like to make initial predictions for incoming students based on predictor data available ...
0
votes
0answers
19 views

bias from aging in a cox regression with time dependent covariate

I am trying to analyse a population cohort with every person followed-up after their 50th birthday until some health related event. Exposure can happen at any time after the 50th birthday, so I have ...
1
vote
1answer
69 views

How do I write a state space model and how do you find the unknown parameters of phi, mu, and matrix A$_t,$ along with covariance matrices Q and R?

Consider a system process given by $x_t=-0.9x_{t-2}+z_t$,$t=1,2,…,n$ with observation $y_t=x_t+v_t$ where ${z_t}$ and ${v_t}$ are independent white noise with variances $σ^2$ and $σ_v^2$. Assume ...
1
vote
0answers
47 views

including the same variable as a time-varying and time-invariant covariate in MLM

I am wondering if the same variable can be used as both Time-varying and time-invariant in the same GEE model. The data set includes: DV - a proportion of young employees in an organization Another ...
1
vote
1answer
80 views

KM survival time transfer function in Cox reg

I have a binary risk factor that can change value over time. I corrected the data using tmerge(). It turns out that the risk factor loses its effect over time. ...
0
votes
0answers
18 views

How to model time series where some Xs are time-variant and some are not

I am looking for a good approach to doing a regression-type model in which some of my X variables vary over time and some do not - i.e., Yit = A + B1*X1t + B2*X2t + B3*X3 Obviously if I do a ...
1
vote
0answers
61 views

How to model LCGA with time-varying covariate

We have the following data set that contains: Variable $X$ - measures a proportion of young employees in an organization Variable $Y$- measures a proportion of young managers in the same ...
2
votes
1answer
40 views

Looking for techniques to understand the impact of a discrete events (interventions) on a continuous response variable in time series

I am trying to model the effect of one or more discrete interventions (e.g., taking a pill, attending therapy) on a continuous outcome (e.g., pain level of a patient over time). The features are ...
0
votes
1answer
113 views

A Hidden Markov model with covariates in the transition probabilities

I would like to construct a Hidden Markov model with data about online customer journeys. A well-known concept related to the customer journey literature is the sales funnel. Consumers walk through ...
2
votes
4answers
190 views

Regression model with time-varying covariates and fixed y

I want to fit a logistic regression model for discriminating between two groups (Control and Cancer) and one of my covariates is measured in five different times (it's a curve with concentrations of a ...
0
votes
1answer
15 views

Accounting for person-time exposed in a binomial GLMM

I have a large data set where we have 5 calendar years data for each person, and we have information about the number of outcomes (taking values 0,1,or 2) each year. We have to account for the ...
2
votes
3answers
132 views

Can we perform matching on post-treatment variables?

I want to match followers of some seed accounts with some random users on Twitter based on observed covariates using the coarsened exact matching method. My goal is to test whether following those ...
2
votes
1answer
319 views

Formatting data for Cox PH with time-dependent covariates

I was hoping for some guidance on the appropriateness of my modeling approach to the following problem. Problem: I'd like to know whether the days receiving nutrition support (cumulative days on ...
0
votes
0answers
26 views

Can I incorporate differencing into a (Cox) survival model?

I am predicting college student dropout with a Cox model. I believe that a declining grade point average (GPA) is predictive of dropout, and I want to incorporate this into my model. I'm looking for ...
0
votes
0answers
73 views

How to get single time to event prediction from competing risk model

I have built a model for predicting remaining hospital length of stay, and I'm interested in investigating whether it would be possible to achieve better performance using a competing risks framework (...
3
votes
0answers
35 views

Modeling true number of sales based on reported number of sales

I have a sequence of numbers of quarterly sales spanning a decade, say $\{Z_i; 1\leq i \leq m\}$. These numbers are not observed until much later. I do have incomplete observations of this sequence ...
1
vote
2answers
645 views

can time trend variables be fixed effects?

Im learning about fixed effects and encountered this regression formula in a textbook: $y_{ist}=\alpha_{0s}+\alpha_{1s}t+\lambda_{t}+\theta D_{st}+X_{ist}\beta+\epsilon_{ist}$, where i is an ...
1
vote
0answers
124 views

R: Cox with time-dependent covariates Validation (discrimination/calibration) package [closed]

I am working on a dataset with multiple measures for each subject (id) and thus time-dependent covariates (measurement_value). I am interested in the "status" outcome. Some subjects do experience the ...
0
votes
1answer
43 views

What data structure is needed for a cox model with time varying covariates?

If our unit of measurement is in days, will a person-period (person-day) dataset be equivalent to a more condensed data set? For example below are the person-period data and condensed data where c1 ...
3
votes
0answers
85 views

Time varying (auto)correlation estimation

I would need to estimate a time varying autocorrelation of a variable. Do you have any references or examples? I've tried to search for a package in R but I wasn't ...
1
vote
1answer
70 views

what is a censoring hazard ratio?

I saw the following expression in paper [1] (equation 1) \begin{equation} \Pi_{i=1}^{n} \left[\frac{HR(t_i,x_{\sigma(i)})}{\sum_{j=1}^{n}Y_j(t_i)HR(t_i,x_{j})}\right]^{\delta_i}\left[\frac{HR^C(t_i,...