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

          Thal And Out Agency railway station See also References External links Navigation menuOfficial Web Site of Pakistan RailwaysArchivedOfficial Web Site of Pakistan Railwayseeexpanding ite

          How can I change the color of pagination dots of UIPageControl?How to change UIPageControl dotsIs there a way to change page indicator dots colorCustomize dot with image of UIPageControl at index 0 of UIPageControlNo visible @interface for 'NSObject<PageControlDelegate>' declares the selector 'pageControlPageDidChange:'How to change the color of pagination dots in UIPageControl with a different color per pagepagecontrol indicator custom image instead of DefaultChanging the colour of UIPageControl dots in MonoTouchpagecontrol selectable page visibility color?Alternative way to load ViewControllers on a UIPageControlHow to set only layer.border-color for UIpage control dots in swiftHow can I develop for iPhone using a Windows development machine?How to change the name of an iOS app?UITableView - change section header coloruipagecontrol indicator(dot)issueCustom UIPageControl dots color not changingchange the interspace between UIPageControl dotsHow to change Status Bar text color in iOSHow can I change image tintColor in iOS and WatchKitUIPageControl dots with larger space in between each dotsHow to change the color of pagination dots in UIPageControl with a different color per page

          Posting a File and Associated Data to a RESTful WebService preferably as JSON2019 Community Moderator ElectionREST URI convention - Singular or plural name of resource while creating itUploading both data and files in one form using Ajax?How do I upload a file with metadata using a REST web service?REST API - file (ie images) processing - best practicesSpring: JSON data and file in the same requestREST API Put large dataPosting a file and JSON data to Spring rest serviceRESTful Web Service Upload/Download Large Data With JSONREST API Design sending JSON data and a file to the api in same requestPost JSONArray to REST servicePUT vs. POST in RESTParsing values from a JSON file?JavaScript/jQuery to download file via POST with JSON dataHow do I upload a file with metadata using a REST web service?How to POST JSON data with Curl from Terminal/Commandline to Test Spring REST?Separate REST JSON API server and client?what's the correct way to send a file from REST web service to client?How do I write JSON data to a file?What is “406-Not Acceptable Response” in HTTP?REST API - file (ie images) processing - best practices