RMark time varying covariates2019 Community Moderator ElectionHow to generate survival data with time dependent covariates using RData Formatting for Time Varying Covariate Cox Proportional Hazards Modeling in RHow to predict survival time in Cox's Regression Model in R?Adding time varying covariates to survival data using 'tmerge' in 'survival' packageRepresenting Parametric Survival Model in 'Counting Process' form in JAGSSurvival times in survival analysisHow to present survival data that includes time-varying covariates and fit the model in RR Flexsurv and time-dependent covariatesSurvival analysis with time varying covariates using coxph in RR - Computing residuals for flexsurvreg or aftreg object

How to find the largest number(s) in a list of elements, possibly non-unique?

Help with identifying unique aircraft over NE Pennsylvania

Should I be concerned about student access to a test bank?

Animating wave motion in water

How old is Nick Fury?

PTIJ: Why do we make a Lulav holder?

Have any astronauts/cosmonauts died in space?

Turning a hard to access nut?

Output visual diagram of picture

Exit shell with shortcut (not typing exit) that closes session properly

Single word to change groups

Weird lines in Microsoft Word

Why is this tree refusing to shed its dead leaves?

Have the tides ever turned twice on any open problem?

Jem'Hadar, something strange about their life expectancy

What is the reasoning behind standardization (dividing by standard deviation)?

Error in master's thesis, I do not know what to do

How do researchers send unsolicited emails asking for feedback on their works?

When should a starting writer get his own webpage?

Gauss brackets with double vertical lines

Friend wants my recommendation but I don't want to give it to him

Did Nintendo change its mind about 68000 SNES?

Is VPN a layer 3 concept?

What are the consequences of changing the number of hours in a day?



RMark time varying covariates



2019 Community Moderator ElectionHow to generate survival data with time dependent covariates using RData Formatting for Time Varying Covariate Cox Proportional Hazards Modeling in RHow to predict survival time in Cox's Regression Model in R?Adding time varying covariates to survival data using 'tmerge' in 'survival' packageRepresenting Parametric Survival Model in 'Counting Process' form in JAGSSurvival times in survival analysisHow to present survival data that includes time-varying covariates and fit the model in RR Flexsurv and time-dependent covariatesSurvival analysis with time varying covariates using coxph in RR - Computing residuals for flexsurvreg or aftreg object










0















I am new to Rmark and have spent the last several weeks exploring forums and manuals attempting to adapt code to my needs with little success.



I am using known-fate models within Rmark to try and relate vegetation covariates (taken over the course of 1 to 70 days) to the survival of the individuals (I'm curious if certain vegetation characteristics influence survival).



Currently my data is set up as follows (I'm showing a very abbreviated form, the real data has 70 rows-one for each individual- and contains more columns for additional covariates.



ch represents the known fate character string. It is 140 characters long relating to the 70 day period (format: observation,fate). g.1, f.1, s.1 are my covariates where the letter (i.e. "g") represents the variable and the #(ie 1) represents the time(day #) of the variable. So g.1 represents grass for day one, f.2 represents forb for day 2, etc. These columns go from g.1, f.1, s.1 all the way to g.70, f.70, s.70. From reading forums it seems this is the best way to format it since each individual needs it's own line.



Some individuals have values for all 70 days, however, most only have data for the first few days since they did not survive very long (we only recorded data if the individual was still alive). So, if an individual only survived 3 days, I would have values for g.1, f.1, s.1 through g.3, f.3, s.3, but g.4, f.4, s.4 through g.70,f.70, s.70 would all contain NA (which I'm sure will be an issue since I had to remove NA's to run survival models related to non-time varying covariates).



I have successfully ran survival models for non-time varying covariates (ie. weight), but I am unsure how to tackle this vegetation by time issue past the point which I am at. I have the standard known fate Rmark code (from example "blackduck")



library(RMark)

f.processed=process.data(df,model="Known")

f.ddl=make.design.data(f.processed)

run.fdata=function()


Example model: S.time = list(formula=~time)
****Need to know how to format model for veg data over time***

model.list=create.model.list("Known")
f.results=mark.wrapper(model.list,data=f.processed,ddl=f.ddl,
invisible=FALSE,threads=2)

return(f.results)

f.results=run.fdata()
f.results


For my purpose, all fawns begin at the same day (i.e 1), but end at various days (based on whether they survived or not) up to the 70 day maximum. I know the [i] is incorrect, but I would like to test models like:



S.grass = list(formula=~g.[i])
S.forb = list(formula=~f.[i])
S.grass.plus.forb = list(formula=g.[i] + f.[i])


that will show how grass, forb, grass+forb, etc relate to survival. Maybe if an individual had more grass they were more likely to survive. Or perhaps an increase in forb meant a decrease in survival (things along this line of thinking).



I would appreciate any help or suggestions or even advice on where to go for help. I have already downloaded a couple Rmark manuals/help guides, yet I am still unable to figure it out.



Thank you for any help!
-Grad Student bashing their head on their monitor










share|improve this question


























    0















    I am new to Rmark and have spent the last several weeks exploring forums and manuals attempting to adapt code to my needs with little success.



    I am using known-fate models within Rmark to try and relate vegetation covariates (taken over the course of 1 to 70 days) to the survival of the individuals (I'm curious if certain vegetation characteristics influence survival).



    Currently my data is set up as follows (I'm showing a very abbreviated form, the real data has 70 rows-one for each individual- and contains more columns for additional covariates.



    ch represents the known fate character string. It is 140 characters long relating to the 70 day period (format: observation,fate). g.1, f.1, s.1 are my covariates where the letter (i.e. "g") represents the variable and the #(ie 1) represents the time(day #) of the variable. So g.1 represents grass for day one, f.2 represents forb for day 2, etc. These columns go from g.1, f.1, s.1 all the way to g.70, f.70, s.70. From reading forums it seems this is the best way to format it since each individual needs it's own line.



    Some individuals have values for all 70 days, however, most only have data for the first few days since they did not survive very long (we only recorded data if the individual was still alive). So, if an individual only survived 3 days, I would have values for g.1, f.1, s.1 through g.3, f.3, s.3, but g.4, f.4, s.4 through g.70,f.70, s.70 would all contain NA (which I'm sure will be an issue since I had to remove NA's to run survival models related to non-time varying covariates).



    I have successfully ran survival models for non-time varying covariates (ie. weight), but I am unsure how to tackle this vegetation by time issue past the point which I am at. I have the standard known fate Rmark code (from example "blackduck")



    library(RMark)

    f.processed=process.data(df,model="Known")

    f.ddl=make.design.data(f.processed)

    run.fdata=function()


    Example model: S.time = list(formula=~time)
    ****Need to know how to format model for veg data over time***

    model.list=create.model.list("Known")
    f.results=mark.wrapper(model.list,data=f.processed,ddl=f.ddl,
    invisible=FALSE,threads=2)

    return(f.results)

    f.results=run.fdata()
    f.results


    For my purpose, all fawns begin at the same day (i.e 1), but end at various days (based on whether they survived or not) up to the 70 day maximum. I know the [i] is incorrect, but I would like to test models like:



    S.grass = list(formula=~g.[i])
    S.forb = list(formula=~f.[i])
    S.grass.plus.forb = list(formula=g.[i] + f.[i])


    that will show how grass, forb, grass+forb, etc relate to survival. Maybe if an individual had more grass they were more likely to survive. Or perhaps an increase in forb meant a decrease in survival (things along this line of thinking).



    I would appreciate any help or suggestions or even advice on where to go for help. I have already downloaded a couple Rmark manuals/help guides, yet I am still unable to figure it out.



    Thank you for any help!
    -Grad Student bashing their head on their monitor










    share|improve this question
























      0












      0








      0








      I am new to Rmark and have spent the last several weeks exploring forums and manuals attempting to adapt code to my needs with little success.



      I am using known-fate models within Rmark to try and relate vegetation covariates (taken over the course of 1 to 70 days) to the survival of the individuals (I'm curious if certain vegetation characteristics influence survival).



      Currently my data is set up as follows (I'm showing a very abbreviated form, the real data has 70 rows-one for each individual- and contains more columns for additional covariates.



      ch represents the known fate character string. It is 140 characters long relating to the 70 day period (format: observation,fate). g.1, f.1, s.1 are my covariates where the letter (i.e. "g") represents the variable and the #(ie 1) represents the time(day #) of the variable. So g.1 represents grass for day one, f.2 represents forb for day 2, etc. These columns go from g.1, f.1, s.1 all the way to g.70, f.70, s.70. From reading forums it seems this is the best way to format it since each individual needs it's own line.



      Some individuals have values for all 70 days, however, most only have data for the first few days since they did not survive very long (we only recorded data if the individual was still alive). So, if an individual only survived 3 days, I would have values for g.1, f.1, s.1 through g.3, f.3, s.3, but g.4, f.4, s.4 through g.70,f.70, s.70 would all contain NA (which I'm sure will be an issue since I had to remove NA's to run survival models related to non-time varying covariates).



      I have successfully ran survival models for non-time varying covariates (ie. weight), but I am unsure how to tackle this vegetation by time issue past the point which I am at. I have the standard known fate Rmark code (from example "blackduck")



      library(RMark)

      f.processed=process.data(df,model="Known")

      f.ddl=make.design.data(f.processed)

      run.fdata=function()


      Example model: S.time = list(formula=~time)
      ****Need to know how to format model for veg data over time***

      model.list=create.model.list("Known")
      f.results=mark.wrapper(model.list,data=f.processed,ddl=f.ddl,
      invisible=FALSE,threads=2)

      return(f.results)

      f.results=run.fdata()
      f.results


      For my purpose, all fawns begin at the same day (i.e 1), but end at various days (based on whether they survived or not) up to the 70 day maximum. I know the [i] is incorrect, but I would like to test models like:



      S.grass = list(formula=~g.[i])
      S.forb = list(formula=~f.[i])
      S.grass.plus.forb = list(formula=g.[i] + f.[i])


      that will show how grass, forb, grass+forb, etc relate to survival. Maybe if an individual had more grass they were more likely to survive. Or perhaps an increase in forb meant a decrease in survival (things along this line of thinking).



      I would appreciate any help or suggestions or even advice on where to go for help. I have already downloaded a couple Rmark manuals/help guides, yet I am still unable to figure it out.



      Thank you for any help!
      -Grad Student bashing their head on their monitor










      share|improve this question














      I am new to Rmark and have spent the last several weeks exploring forums and manuals attempting to adapt code to my needs with little success.



      I am using known-fate models within Rmark to try and relate vegetation covariates (taken over the course of 1 to 70 days) to the survival of the individuals (I'm curious if certain vegetation characteristics influence survival).



      Currently my data is set up as follows (I'm showing a very abbreviated form, the real data has 70 rows-one for each individual- and contains more columns for additional covariates.



      ch represents the known fate character string. It is 140 characters long relating to the 70 day period (format: observation,fate). g.1, f.1, s.1 are my covariates where the letter (i.e. "g") represents the variable and the #(ie 1) represents the time(day #) of the variable. So g.1 represents grass for day one, f.2 represents forb for day 2, etc. These columns go from g.1, f.1, s.1 all the way to g.70, f.70, s.70. From reading forums it seems this is the best way to format it since each individual needs it's own line.



      Some individuals have values for all 70 days, however, most only have data for the first few days since they did not survive very long (we only recorded data if the individual was still alive). So, if an individual only survived 3 days, I would have values for g.1, f.1, s.1 through g.3, f.3, s.3, but g.4, f.4, s.4 through g.70,f.70, s.70 would all contain NA (which I'm sure will be an issue since I had to remove NA's to run survival models related to non-time varying covariates).



      I have successfully ran survival models for non-time varying covariates (ie. weight), but I am unsure how to tackle this vegetation by time issue past the point which I am at. I have the standard known fate Rmark code (from example "blackduck")



      library(RMark)

      f.processed=process.data(df,model="Known")

      f.ddl=make.design.data(f.processed)

      run.fdata=function()


      Example model: S.time = list(formula=~time)
      ****Need to know how to format model for veg data over time***

      model.list=create.model.list("Known")
      f.results=mark.wrapper(model.list,data=f.processed,ddl=f.ddl,
      invisible=FALSE,threads=2)

      return(f.results)

      f.results=run.fdata()
      f.results


      For my purpose, all fawns begin at the same day (i.e 1), but end at various days (based on whether they survived or not) up to the 70 day maximum. I know the [i] is incorrect, but I would like to test models like:



      S.grass = list(formula=~g.[i])
      S.forb = list(formula=~f.[i])
      S.grass.plus.forb = list(formula=g.[i] + f.[i])


      that will show how grass, forb, grass+forb, etc relate to survival. Maybe if an individual had more grass they were more likely to survive. Or perhaps an increase in forb meant a decrease in survival (things along this line of thinking).



      I would appreciate any help or suggestions or even advice on where to go for help. I have already downloaded a couple Rmark manuals/help guides, yet I am still unable to figure it out.



      Thank you for any help!
      -Grad Student bashing their head on their monitor







      r rmark






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Mar 7 at 19:04









      user11132475user11132475

      11




      11






















          0






          active

          oldest

          votes











          Your Answer






          StackExchange.ifUsing("editor", function ()
          StackExchange.using("externalEditor", function ()
          StackExchange.using("snippets", function ()
          StackExchange.snippets.init();
          );
          );
          , "code-snippets");

          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "1"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55051081%2frmark-time-varying-covariates%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes















          draft saved

          draft discarded
















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55051081%2frmark-time-varying-covariates%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Identity Server 4 is not redirecting to Angular app after login2019 Community Moderator ElectionIdentity Server 4 and dockerIdentityserver implicit flow unauthorized_clientIdentityServer Hybrid Flow - Access Token is null after user successful loginIdentity Server to MVC client : Page Redirect After loginLogin with Steam OpenId(oidc-client-js)Identity Server 4+.NET Core 2.0 + IdentityIdentityServer4 post-login redirect not working in Edge browserCall to IdentityServer4 generates System.NullReferenceException: Object reference not set to an instance of an objectIdentityServer4 without HTTPS not workingHow to get Authorization code from identity server without login form

          2005 Ahvaz unrest Contents Background Causes Casualties Aftermath See also References Navigation menue"At Least 10 Are Killed by Bombs in Iran""Iran"Archived"Arab-Iranians in Iran to make April 15 'Day of Fury'"State of Mind, State of Order: Reactions to Ethnic Unrest in the Islamic Republic of Iran.10.1111/j.1754-9469.2008.00028.x"Iran hangs Arab separatists"Iran Overview from ArchivedConstitution of the Islamic Republic of Iran"Tehran puzzled by forged 'riots' letter""Iran and its minorities: Down in the second class""Iran: Handling Of Ahvaz Unrest Could End With Televised Confessions""Bombings Rock Iran Ahead of Election""Five die in Iran ethnic clashes""Iran: Need for restraint as anniversary of unrest in Khuzestan approaches"Archived"Iranian Sunni protesters killed in clashes with security forces"Archived

          Can't initialize raids on a new ASUS Prime B360M-A motherboard2019 Community Moderator ElectionSimilar to RAID config yet more like mirroring solution?Can't get motherboard serial numberWhy does the BIOS entry point start with a WBINVD instruction?UEFI performance Asus Maximus V Extreme