1
$\begingroup$

I am trying to understand how one would go about setting up a regression model, including construction of the data matrix, when you have a response variable y that experiences lagged effects from a single predictor variable x; for example, modelling the expected impact on blood glucose levels over time based on one dose of insulin. I imagine dummy coding of the time intervals into dichotomous variables could be a place to start but I am not sure. I am experienced with regression using paired observations but not so much with this example. Thank you!

$\endgroup$
5
  • $\begingroup$ If you know how many lags you want to include, why don't you just include them as regressors? In R there is a useful function embed that produces a matrix of lags of variable. That matrix could be used as the design matrix. (My background is in financial or macroeconomic time series, so I might be missing some peculiarity of your setting.) $\endgroup$ Commented Mar 30, 2016 at 16:57
  • $\begingroup$ @RichardHardy, that makes sense. I would force the intercept to be the starting blood glucose level and then use time intervals as regressors after the injection. I received other advice from an experienced statistician, though, who said that he was not sure time series type regression would be best in a lag event since the occurrence is basically a status change. He says I could treat the pre-post of the effect like transferring from group A to group B (this supposes that there are at least 2 continuous measures though, i.e. a criterion and an indicator). What do you think of that approach? $\endgroup$
    – A. Vezey
    Commented Mar 31, 2016 at 13:50
  • 1
    $\begingroup$ I would not have the confidence to argue strongly for or against that, but the term "status change" seems to imply instantaneous effect without lagged effects, which is not what you want. $\endgroup$ Commented Mar 31, 2016 at 14:21
  • $\begingroup$ @RichardHardy that makes sense. I will consider this question answered! I am new to Cross Validated, will you post your comment in a formal answer and then I mark it as answered? Or is the comment enough? $\endgroup$
    – A. Vezey
    Commented Mar 31, 2016 at 14:42
  • $\begingroup$ I intentionally posted my opinion as a comment since I am not so confident it makes sense (and since it is quite short), but if it does for you, then I can post it as an answer, too. $\endgroup$ Commented Mar 31, 2016 at 15:32

1 Answer 1

1
$\begingroup$

If you know how many lags you want to include, why don't you just include them as regressors? In R there is a useful function embed that produces a matrix of lags of variable. That matrix could be used as the design matrix.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.