Using design matrix to find mean of time varying covariate

Forum for discussion of general questions related to study design and/or analysis of existing data - software neutral.

Using design matrix to find mean of time varying covariate

Postby AdamC » Thu Feb 25, 2016 5:45 pm

In the 2001 paper "Advanced features of program MARK"(1) (http://warnercnr.colostate.edu/~gwhite/ ... vanced.PDF) a method is described to calculate the mean and standard error of a set of time-varying-covariate parameters (starting at the bottom of the second page). This is done by making one parameter the mean by coding "-1"s into the design matrix. So my questions:

  • Is it still the preferred method for calculating a mean and SE parameter estimate for a time varying covariate?
  • Is this possible to implement in RMark?
  • If not, what is the alternative? Booting up MARK's GUI or a different formulation coded in R?

I get the feeling "read about delta method" might be an the answer here. Does it calculate the same SE value? From the 2001 paper:
This SE provides the sampling variation of the estimate of the mean and does not include the process variance associated with the set of estimates. That is,this SE represents a fixed effects design, with the SE providing the precision of the mean for the observed time period.


I've asked this in the RMark forum because that's my preferred solution if several solutions are available.

(1) White, GARY C., KENNETH P. Burnham, and DAVID R. Anderson. "Advanced features of program MARK." Wildlife, land, and people: priorities for the 21st century. Proceedings of the second international wildlife management congress. The Wildlife Society, Bethesda, Maryland, USA. 2001.
AdamC
 
Posts: 10
Joined: Wed Jan 20, 2016 4:20 pm

Re: Using design matrix to find mean of time varying covaria

Postby cooch » Thu Feb 25, 2016 6:14 pm

AdamC wrote:In the 2001 paper "Advanced features of program MARK"(1) (http://warnercnr.colostate.edu/~gwhite/ ... vanced.PDF) a method is described to calculate the mean and standard error of a set of time-varying-covariate parameters (starting at the bottom of the second page). This is done by making one parameter the mean by coding "-1"s into the design matrix. So my questions:

  • Is it still the preferred method for calculating a mean and SE parameter estimate for a time varying covariate?
  • Is this possible to implement in RMark?
  • If not, what is the alternative? Booting up MARK's GUI or a different formulation coded in R?

I get the feeling "read about delta method" might be an the answer here. Does it calculate the same SE value? From the 2001 paper:
This SE provides the sampling variation of the estimate of the mean and does not include the process variance associated with the set of estimates. That is,this SE represents a fixed effects design, with the SE providing the precision of the mean for the observed time period.


I've asked this in the RMark forum because that's my preferred solution if several solutions are available.

(1) White, GARY C., KENNETH P. Burnham, and DAVID R. Anderson. "Advanced features of program MARK." Wildlife, land, and people: priorities for the 21st century. Proceedings of the second international wildlife management congress. The Wildlife Society, Bethesda, Maryland, USA. 2001.



Answer to question --> you need to read the MARK book (which supersedes the paper(s) you're referring to by a considerable margin -- said papers are also a bit 'long in the tooth'). Specifically, chapter 6, section 6.15, which is entirely devoted to your question.

Related -- if the question relates to MARK, (i) search the forum, and/or (ii) the MARK book. If the answer isn't in one or the other, then that is a good question to post here. In this instance, if you'd searched the MARK book, you'd have found the answer in very short order.
cooch
 
Posts: 1628
Joined: Thu May 15, 2003 4:11 pm
Location: Cornell University

Re: Using design matrix to find mean of time varying covaria

Postby cooch » Thu Feb 25, 2016 6:18 pm

AdamC wrote:In the 2001 paper "Advanced features of program MARK"(1) (http://warnercnr.colostate.edu/~gwhite/ ... vanced.PDF) a method is described to calculate the mean and standard error of a set of time-varying-covariate parameters


Also, to correct your 'phrasing' -- you're not finding the mean of the covariate, but the method you reference in said paper is a method for calculating the mean of a parameter over a set of intervals (in the paper, mean survival over a set of intervals).

If that's what you want to do, then 6.15 in 'the book' will get you there.
cooch
 
Posts: 1628
Joined: Thu May 15, 2003 4:11 pm
Location: Cornell University

Re: Using design matrix to find mean of time varying covaria

Postby jlaake » Thu Feb 25, 2016 6:23 pm

With regard to RMark part of the question:

You can set the contrasts used for the formula with the options function. I believe you are describing the sum contrast. However, if you do that then all contrasts in the formula will be sum contrasts. I have not done that but theoretically it should work. If you only want sum contrasts for one portion of the DM then you can do so by creating the columns of the DM as variables in the design data and then using each column as an additive effect. For example, as a simple example let's say you have a factor variable fac that has 3 levels. The formula ~fac will create an intercept column and 2 dummy variable columns. You can fit the same model by adding 2 dummy variable columns: 1) fac1 is 1 for fac level 2 and 0 otherwise and 2) fac2 is 1 for level 3 and 0 otherwise. Then ~fac1+fac2 will fit the same model. Every row in the design data of a parameter corresponds to a row in the DM for that parameter, so you can create individual columns of the DM by creating them in the design data and adding each column to the formula to have them added to the DM.

--jeff
jlaake
 
Posts: 1417
Joined: Fri May 12, 2006 12:50 pm
Location: Escondido, CA

Re: Using design matrix to find mean of time varying covaria

Postby AdamC » Thu Feb 25, 2016 8:56 pm

Amazing response time and helpfulness as always from you two.

Thank you for pointing me toward section 6.15. It more clearly explains how to calculate the parameter mean over intervals and why its better than just fitting the S(.) model.

And thank you for the 'terminology' pointer. Funnily enough, you can see the progression in my phrasing in the original post. I start by saying "mean of time varying covariate" in the title which is obviously wrong. Then I said "mean of a set of time-varying-covariate parameters" which is also wrong but slightly less so. And then, my final usage "mean parameter estimate for a time varying covariate". Still not perfect, but progress!

Jeff -- I'll have to whiteboard your comment to make sure I understand it. I haven't yet cultivated the ability to hold and manipulate DMs in my mind. I'm pretty sure I understand your simple example but I haven't connected the dots back to the original question. I'm not claiming they aren't there, just that it will require more rigorous thinking then I've given it yet. I also haven't used the 'options' argument yet so I'll also be exploring that.

I'll report back here if I can't figure it out.
Thanks again.
AdamC
 
Posts: 10
Joined: Wed Jan 20, 2016 4:20 pm

Re: Using design matrix to find mean of time varying covaria

Postby jlaake » Thu Feb 25, 2016 11:55 pm

To be clear options is an R function and not an argument to any function in RMark.
jlaake
 
Posts: 1417
Joined: Fri May 12, 2006 12:50 pm
Location: Escondido, CA


Return to analysis & design questions

Who is online

Users browsing this forum: No registered users and 14 guests