Buck1480 Tracker
https://communities.sas.com/kntur85557/tracker
Buck1480 TrackerSun, 10 Nov 2024 09:58:31 GMT2024-11-10T09:58:31ZRe: PROC LIFETEST
https://communities.sas.com/t5/SAS-Procedures/PROC-LIFETEST/m-p/145286#M38608
<HTML><HEAD></HEAD><BODY><P>Reeza, </P><P></P><P>Thanks for the reply! I'm trying to address both annual (year-to-year) survival and seasonal (fall, winter, spring, summer) survival. I have two research questions: 1) what is the annual survival of a select avian species?; and 2) what is the seasonal survival of the select avian species? I have 2.5 years of survival data that I would like to use. We started sampling (or tagging) the avian species on 12/14/2010 and ended on March 15, 2011. We then re-started tagging during June-July 2011. Then again in January 1, 2012-March 15, 2012. Then once again from January 1, 2013-March 15, 2013. <SPAN style="font-size: 10pt; line-height: 1.5em;">Individuals were tagged throughout all sampling periods. Likewise, individuals were monitored throughout the entire year during 2011 and 2012; however, monitoring ceased after July 31, 2013. Therefore, I planned to only calculate annual survival estimates for 2011 and 2012 since I had a full year of data for each time period. Thereafter, I would break each year into separate seasons (to see if a seasonal difference in survival existed). The seasonal periods would then include the 2013 data up to July 31, 2013. Does that make sense? Thanks again for the help! </SPAN></P><P></P><P>Best regards, </P><P>Andy</P></BODY></HTML>Sat, 02 Aug 2014 19:25:10 GMThttps://communities.sas.com/t5/SAS-Procedures/PROC-LIFETEST/m-p/145286#M38608Buck14802014-08-02T19:25:10ZRe: PROC LIFETEST
https://communities.sas.com/t5/SAS-Procedures/PROC-LIFETEST/m-p/145284#M38606
<HTML><HEAD></HEAD><BODY><P>SteveDenham, </P><P></P><P>Thanks for the reply! Based on your explanation for Approach 2, wouldn't the second (or third, so on and so far) animal tagged on another date already be considered "at risk." The idea of the staggered entry approach is to treat each individual separately on their entry into the study. Therefore, if animal 1 is tagged on January 1, 2011 and animal 2 is tagged on March 15, 2011, the start day for each animal should be the day they are marked rather than using the first day the first animal is tagged. Does that make sense? </P><P></P><P>To me, it makes sense to use your first example since each animal is added into the study along the way. In my case, I may have an animal enter the study on January 1, 2011 and another enter the study on March 15, 2011; therefore, I think it would be most appropriate (based on the idea of staggered entry) to calculate the number of days "at risk" from the date of capture until a selected end date. </P><P></P><P>As animals fall out of the study due to death or radio-trasnmitter failure, do they get coded a 0 for censoring? For example (using the first approach), would you set your dataset up in the following manner: </P><P></P><P>ID = Animal ID </P><P>Days2Event = Days to death or end of study for 1 year</P><P>Status = censored (0) or not</P><P></P><P>ID Days2Event Status</P><P>1 35 0</P><P>2 364 1</P><P>3 190 0</P><P></P><P>Lastly, if the first date of capture for animal 1 is 12/14/2010 and I wanted to calculate annual survival (using approach 1 above where I set an end date (e.g., December 31, 2011), how would you treat the number of days between 12/14/2010-12/31/2011 as this is obviously longer than a year. This is where approach 2 seems more appropriate because you could set the annual survival based on the first day of capture. Just curious. </P><P></P><P>Thanks, </P><P>Andy</P></BODY></HTML>Fri, 01 Aug 2014 18:52:45 GMThttps://communities.sas.com/t5/SAS-Procedures/PROC-LIFETEST/m-p/145284#M38606Buck14802014-08-01T18:52:45ZRe: PROC LIFETEST
https://communities.sas.com/t5/SAS-Procedures/PROC-LIFETEST/m-p/145282#M38604
<HTML><HEAD></HEAD><BODY><P>Reeza, </P><P></P><P>Yes. According to<SPAN style="font-size: 10pt; line-height: 1.5em;"> the Analysis of Wildlife Radio-Tracking Data book by Garrott and White (1990), they state, "PROC LIFETEST of SAS can be used to compute the Kaplan-Meier estimates for these data if all animals enter the experiment at the same time." This is not the case for wildlife telemetry datasets so the SAS code must be adjusted to account for staggered entry. Likewise, Pollock et al. (1989) published a paper on adjusting the Kaplan-Meier survival calculation for a staggered entry approach and mentioned at the conclusion of the paper that PROC LIFETEST could work if all animals entered the study at the same time. Again, this is not the case for wildlife telemetry studies since animals are added or removed throughout the entire study process. Hopefully this helps with your question. </SPAN></P><P><SPAN style="font-size: 10pt; line-height: 1.5em;"><BR /></SPAN></P><P><SPAN style="font-size: 10pt; line-height: 1.5em;">I'm still looking for a way to run the analysis in SAS. Hopefully one does exist. <BR /></SPAN></P><P></P><P>Best regards, </P><P>Andy</P></BODY></HTML>Fri, 01 Aug 2014 16:36:30 GMThttps://communities.sas.com/t5/SAS-Procedures/PROC-LIFETEST/m-p/145282#M38604Buck14802014-08-01T16:36:30ZPROC LIFETEST
https://communities.sas.com/t5/SAS-Procedures/PROC-LIFETEST/m-p/145280#M38602
<HTML><HEAD></HEAD><BODY><P>All: </P><P></P><P>I need to conduct a Kaplan-Meier survival analysis using a staggered entry approach for wildlife survival data (see Pollock et al. 1989). Specifically, the issue that I have is that PROC LIFETEST only permits survival estimate calculation when all individuals enter the study at the same time. However, in the world of wildlife management, we frequently encounter issues of additional individuals being censored or added throughout the study period (i.e., staggered entry). Is there a way in PROC LIFETEST that you can calculate a staggered entry survival? I appreciate the comments! </P><P></P><P>Thanks, </P><P>Andy</P></BODY></HTML>Thu, 31 Jul 2014 21:07:45 GMThttps://communities.sas.com/t5/SAS-Procedures/PROC-LIFETEST/m-p/145280#M38602Buck14802014-07-31T21:07:45ZRe: WARNING: Pseudo-likelihood update fails in outer iteration 3
https://communities.sas.com/t5/Statistical-Procedures/WARNING-Pseudo-likelihood-update-fails-in-outer-iteration-3/m-p/73016#M3517
Thanks Susan! I greatly appreciate your input!Fri, 10 Jun 2011 21:10:25 GMThttps://communities.sas.com/t5/Statistical-Procedures/WARNING-Pseudo-likelihood-update-fails-in-outer-iteration-3/m-p/73016#M3517Buck14802011-06-10T21:10:25ZRe: WARNING: Pseudo-likelihood update fails in outer iteration 3
https://communities.sas.com/t5/Statistical-Procedures/WARNING-Pseudo-likelihood-update-fails-in-outer-iteration-3/m-p/73014#M3515
Sorry Susan, I forgot to post my first code that I ran this morning that gave me the first LOG Output! See below:<BR />
<BR />
PROC GLIMMIX DATA=HABITAT; BY EXPOSURE TREAT DN;<BR />
CLASS ID TREAT YEAR HABVALUE;<BR />
MODEL VALUE (EVENT = '1') = HABVALUE ROAD_LOG ELEVATION ELEVATION_QUAD SLOPE SLOPE_QUAD / DIST=BINARY LINK=LOGIT SOLUTION;<BR />
RANDOM ID(TREAT) TREAT YEAR / TYPE=VC;<BR />
RANDOM ELEVATION SLOPE ROAD HABVALUE / TYPE=VC SUBJECT=ID;<BR />
RUN;Fri, 10 Jun 2011 16:21:18 GMThttps://communities.sas.com/t5/Statistical-Procedures/WARNING-Pseudo-likelihood-update-fails-in-outer-iteration-3/m-p/73014#M3515Buck14802011-06-10T16:21:18ZRe: WARNING: Pseudo-likelihood update fails in outer iteration 3
https://communities.sas.com/t5/Statistical-Procedures/WARNING-Pseudo-likelihood-update-fails-in-outer-iteration-3/m-p/73013#M3514
Susan, <BR />
<BR />
Sorry for the confusion about study description to help with the questions that I'm asking! My study was conducted on a 1,861 hectare property and was divided into 3 treatments of approximately equal size and vegetative composition. The three treats are control, no hunters; low density, 1 hunter/101 ha; and high density, 1 hunter/30 ha. I decided to evaluate exposure to hunting pressure (initial, days 1-3; prolonged, days 4-13) to assess differences in habitat selection and by treatment levels. These are the two categorical variables in the model. The other categorical variable is habitat value (1 = mixed, 2 = forest, and 3 = field). To conduct a logistic regression analysis using PROC GLIMMIX, I allocated random GPS locations on the study area and paired them with actual animal locations. I've been working with two biometricians and we're all stumped on the issues that I'm having in this analysis. We decided to take a more simplistic approach to get away from the three-way interactions using a "BY" statement for EXPOSURE, TREAT, AND DN to use more of an estimation approach since with a large daatset we're bound to find something statistically significant. See my new model below:<BR />
<BR />
PROC GLIMMIX DATA=HABITAT; BY EXPOSURE TREAT DN;<BR />
CLASS ID TREAT YEAR HABVALUE;<BR />
MODEL VALUE (EVENT = '1') = HABVALUE ROAD_LOG ELEVATION ELEVATION_QUAD SLOPE SLOPE_QUAD / DIST=BINARY LINK=LOGIT SOLUTION;<BR />
RANDOM ID(TREAT) TREAT YEAR / TYPE=VC;<BR />
RANDOM ELEVATION SLOPE ROAD HABVALUE / TYPE=VC SUBJECT=ID;<BR />
RUN;<BR />
<BR />
I have two years of data (YEAR), TREAT(control, low, and high), and ID(TREAT) selection of resources made by an animal are more similar or correlated within each treatment. Lastly, RANDOM ELEVATION SLOPE ROAD HABVALUE are added to models the correlation of resource selection within individuals, which means that selection of (e.g., elevation) between intervals is correlated within an individual. <BR />
<BR />
I ran this more simplistic model this morning and here's the errors I received back:<BR />
<BR />
NOTE: The GLIMMIX procedure is modeling the probability that Value='1'.<BR />
WARNING: Pseudo-likelihood update fails in outer iteration 5.<BR />
NOTE: Did not converge.<BR />
NOTE: The above message was for the following BY group:<BR />
EXPOSURE=Initial TREAT=Control DN=Diurnal<BR />
NOTE: The GLIMMIX procedure is modeling the probability that Value='1'.<BR />
WARNING: Pseudo-likelihood update fails in outer iteration 3.<BR />
NOTE: Did not converge.<BR />
NOTE: The above message was for the following BY group:<BR />
EXPOSURE=Initial TREAT=Control DN=Nocturnal<BR />
NOTE: The GLIMMIX procedure is modeling the probability that Value='1'.<BR />
WARNING: Pseudo-likelihood update fails in outer iteration 3.<BR />
NOTE: Did not converge.<BR />
NOTE: The above message was for the following BY group:<BR />
EXPOSURE=Initial TREAT=High DN=Diurnal<BR />
NOTE: The GLIMMIX procedure is modeling the probability that Value='1'.<BR />
WARNING: Pseudo-likelihood update fails in outer iteration 4.<BR />
NOTE: Did not converge.<BR />
NOTE: The above message was for the following BY group:<BR />
EXPOSURE=Initial TREAT=High DN=Nocturnal<BR />
NOTE: The GLIMMIX procedure is modeling the probability that Value='1'.<BR />
WARNING: Pseudo-likelihood update fails in outer iteration 3.<BR />
NOTE: Did not converge.<BR />
NOTE: The above message was for the following BY group:<BR />
EXPOSURE=Initial TREAT=Low DN=Diurnal<BR />
NOTE: The GLIMMIX procedure is modeling the probability that Value='1'.<BR />
WARNING: Pseudo-likelihood update fails in outer iteration 7.<BR />
NOTE: Did not converge.<BR />
NOTE: The above message was for the following BY group:<BR />
EXPOSURE=Initial TREAT=Low DN=Nocturnal<BR />
NOTE: The GLIMMIX procedure is modeling the probability that Value='1'.<BR />
WARNING: Pseudo-likelihood update fails in outer iteration 2.<BR />
NOTE: Did not converge.<BR />
NOTE: The above message was for the following BY group:<BR />
EXPOSURE=Prolong TREAT=Control DN=Diurnal<BR />
NOTE: The GLIMMIX procedure is modeling the probability that Value='1'.<BR />
WARNING: Pseudo-likelihood update fails in outer iteration 4.<BR />
NOTE: Did not converge.<BR />
NOTE: The above message was for the following BY group:<BR />
EXPOSURE=Prolong TREAT=Control DN=Nocturnal<BR />
NOTE: The GLIMMIX procedure is modeling the probability that Value='1'.<BR />
WARNING: Pseudo-likelihood update fails in outer iteration 2.<BR />
NOTE: Did not converge.<BR />
NOTE: The above message was for the following BY group:<BR />
EXPOSURE=Prolong TREAT=High DN=Diurnal<BR />
NOTE: The GLIMMIX procedure is modeling the probability that Value='1'.<BR />
WARNING: Pseudo-likelihood update fails in outer iteration 2.<BR />
NOTE: Did not converge.<BR />
NOTE: The above message was for the following BY group:<BR />
EXPOSURE=Prolong TREAT=High DN=Nocturnal<BR />
NOTE: The GLIMMIX procedure is modeling the probability that Value='1'.<BR />
WARNING: Pseudo-likelihood update fails in outer iteration 3.<BR />
NOTE: Did not converge.<BR />
NOTE: The above message was for the following BY group:<BR />
EXPOSURE=Prolong TREAT=Low DN=Diurnal<BR />
NOTE: The GLIMMIX procedure is modeling the probability that Value='1'.<BR />
NOTE: Did not converge.<BR />
NOTE: The above message was for the following BY group:<BR />
EXPOSURE=Prolong TREAT=Low DN=Nocturnal<BR />
NOTE: PROCEDURE GLIMMIX used (Total process time):<BR />
real time 49.51 seconds<BR />
cpu time 40.78 seconds<BR />
<BR />
<BR />
So I decided to remove the last RANDOM statment and used the following model: <BR />
<BR />
PROC GLIMMIX DATA=HABITAT; BY EXPOSURE TREAT DN;<BR />
CLASS ID YEAR TREAT HABVALUE;<BR />
MODEL VALUE (EVENT = '1') = HABVALUE ROAD_LOG ELEVATION ELEVATION_QUAD SLOPE SLOPE_QUAD / DIST=BINARY LINK=LOGIT SOLUTION;<BR />
RANDOM ID ID(TREAT) TREAT YEAR / TYPE=VC;<BR />
RUN;<BR />
<BR />
<BR />
I received the message: "Estimated G Matrx is not positive definite" again and you mentioned that there are some ways to tweek the model to eliminate this error. Additionally, I only had one Warning: Pseudo-likelihood update fails in outer iteration 3. NOTE: Did not converge. See rest of LOG Output below:<BR />
<BR />
<BR />
NOTE: The GLIMMIX procedure is modeling the probability that Value='1'.<BR />
NOTE: Convergence criterion (PCONV=1.11022E-8) satisfied.<BR />
NOTE: The above message was for the following BY group:<BR />
EXPOSURE=Initial TREAT=Control DN=Diurnal<BR />
NOTE: The GLIMMIX procedure is modeling the probability that Value='1'.<BR />
NOTE: Convergence criterion (PCONV=1.11022E-8) satisfied.<BR />
NOTE: Estimated G matrix is not positive definite.<BR />
NOTE: The above message was for the following BY group:<BR />
EXPOSURE=Initial TREAT=Control DN=Nocturnal<BR />
NOTE: The GLIMMIX procedure is modeling the probability that Value='1'.<BR />
WARNING: Pseudo-likelihood update fails in outer iteration 3.<BR />
NOTE: Did not converge.<BR />
NOTE: The above message was for the following BY group:<BR />
EXPOSURE=Initial TREAT=High DN=Diurnal<BR />
NOTE: The GLIMMIX procedure is modeling the probability that Value='1'.<BR />
NOTE: Convergence criterion (PCONV=1.11022E-8) satisfied.<BR />
NOTE: Estimated G matrix is not positive definite.<BR />
NOTE: The above message was for the following BY group:<BR />
EXPOSURE=Initial TREAT=High DN=Nocturnal<BR />
NOTE: The GLIMMIX procedure is modeling the probability that Value='1'.<BR />
NOTE: Convergence criterion (PCONV=1.11022E-8) satisfied.<BR />
NOTE: The above message was for the following BY group:<BR />
EXPOSURE=Initial TREAT=Low DN=Diurnal<BR />
NOTE: The GLIMMIX procedure is modeling the probability that Value='1'.<BR />
NOTE: Convergence criterion (PCONV=1.11022E-8) satisfied.<BR />
NOTE: Estimated G matrix is not positive definite.<BR />
NOTE: The above message was for the following BY group:<BR />
EXPOSURE=Initial TREAT=Low DN=Nocturnal<BR />
NOTE: The GLIMMIX procedure is modeling the probability that Value='1'.<BR />
NOTE: Convergence criterion (PCONV=1.11022E-8) satisfied.<BR />
NOTE: Estimated G matrix is not positive definite.<BR />
NOTE: The above message was for the following BY group:<BR />
EXPOSURE=Prolong TREAT=Control DN=Diurnal<BR />
NOTE: The GLIMMIX procedure is modeling the probability that Value='1'.<BR />
NOTE: Convergence criterion (PCONV=1.11022E-8) satisfied.<BR />
NOTE: Estimated G matrix is not positive definite.<BR />
NOTE: The above message was for the following BY group:<BR />
EXPOSURE=Prolong TREAT=Control DN=Nocturnal<BR />
NOTE: The GLIMMIX procedure is modeling the probability that Value='1'.<BR />
NOTE: Convergence criterion (PCONV=1.11022E-8) satisfied.<BR />
NOTE: Estimated G matrix is not positive definite.<BR />
NOTE: The above message was for the following BY group:<BR />
EXPOSURE=Prolong TREAT=High DN=Diurnal<BR />
NOTE: The GLIMMIX procedure is modeling the probability that Value='1'.<BR />
NOTE: Convergence criterion (PCONV=1.11022E-8) satisfied.<BR />
NOTE: Estimated G matrix is not positive definite.<BR />
NOTE: The above message was for the following BY group:<BR />
EXPOSURE=Prolong TREAT=High DN=Nocturnal<BR />
NOTE: The GLIMMIX procedure is modeling the probability that Value='1'.<BR />
NOTE: Convergence criterion (PCONV=1.11022E-8) satisfied.<BR />
NOTE: Estimated G matrix is not positive definite.<BR />
NOTE: The above message was for the following BY group:<BR />
EXPOSURE=Prolong TREAT=Low DN=Diurnal<BR />
NOTE: The GLIMMIX procedure is modeling the probability that Value='1'.<BR />
NOTE: Convergence criterion (PCONV=1.11022E-8) satisfied.<BR />
NOTE: Estimated G matrix is not positive definite.<BR />
NOTE: The above message was for the following BY group:<BR />
EXPOSURE=Prolong TREAT=Low DN=Nocturnal<BR />
NOTE: PROCEDURE GLIMMIX used (Total process time):<BR />
real time 14.18 seconds<BR />
cpu time 10.98 seconds<BR />
<BR />
<BR />
Based on the new SAS code using a more simplistic approach to get away from 3-way interactions, I think I'm getting closer. Overall, I want to estimate the probability of animals selecting different resources within each treatment. Additionally, I'm not missing any data in the entire dataset. Do you have any additional suggestions based on where I'm at now? Thank you very much for all of your input!Fri, 10 Jun 2011 16:18:41 GMThttps://communities.sas.com/t5/Statistical-Procedures/WARNING-Pseudo-likelihood-update-fails-in-outer-iteration-3/m-p/73013#M3514Buck14802011-06-10T16:18:41ZWARNING: Pseudo-likelihood update fails in outer iteration 3
https://communities.sas.com/t5/Statistical-Procedures/WARNING-Pseudo-likelihood-update-fails-in-outer-iteration-3/m-p/73011#M3512
Hi, I've been feverishly working to model habitat selection data using PROC GLIMMIX. My original model was as follows:<BR />
<BR />
PROC GLIMMIX DATA=HABITAT;<BR />
CLASS ID YEAR EXPOSURE TREAT HABVALUE;<BR />
MODEL VALUE (EVENT = '1') = TREAT EXPOSURE HABVALUE ROAD_LOG ELEVATION ELEVATION_QUAD SLOPE SLOPE_QUAD TREAT*EXPOSURE*HABVALUE TREAT*EXPOSURE*ROAD_LOG TREAT*EXPOSURE*ELEVATION TREAT*EXPOSURE*ELEVATION_QUAD TREAT*EXPOSURE*SLOPE TREAT*EXPOSURE*SLOPE_QUAD / DIST=BINARY LINK=LOGIT SOLUTION;<BR />
RANDOM ID(TREAT) TREAT YEAR /TYPE=VC;<BR />
RANDOM DTID / TYPE = AR(1) SUBJECT=ID;<BR />
RANDOM ELEVATION SLOPE ROAD HABVALUE/ TYPE=VC SUBJECT=ID;<BR />
RUN;<BR />
<BR />
<BR />
Unfortunately, this model did not work (error: insufficient memory; read more about this issue on my previous posting<BR />
<BR />
<A href="http://support.sas.com/forums/thread.jspa?threadID=14424&tstart=0" target="_blank">http://support.sas.com/forums/thread.jspa?threadID=14424&tstart=0</A><BR />
<BR />
Susan commented on this model:<BR />
<BR />
Re: Insufficient Memory <BR />
Posted: May 27, 2011 3:51 PM in response to: Buck1480 Reply <BR />
<BR />
<BR />
You've obviously given thought to the construction of your model. It's possible that the model you would like on theoretical grounds is too optimistic--in other words, you might like it to do more than it might be able to.<BR />
<BR />
I agree with your suspicion: you may be getting a bit carried away with random-effects factors. Take a look at the Dimensions table, in particular the "Columns in Z" entry to get a sense of how big a task you've set for GLIMMIX.<BR />
<BR />
Apparently, you have repeated locations (DTID) on each deer. I imagine the number varies by individual deer; about how many are there for each deer? How many deer did you follow?<BR />
<BR />
Is there a random GPS location paired with each deer location? How is the random location "connected" to the deer location? Are the random and deer locations truly paired?<BR />
<BR />
EXPOSURE, TREAT and HABVALUE appear to be experimental or quasi-experimental factors. What is the design unit (for example, ID) with which each of these factors is associated or to which a level of each factor was (randomly) assigned?<BR />
<BR />
TREAT should not be in both MODEL and RANDOM statements. I presume that TREAT is a fixed-effects factor; if so, it should be omitted from the first RANDOM statement.<BR />
<BR />
RANDOM ID(TREAT) implies that a level of TREAT was assigned to each ID. Is that true?<BR />
<BR />
Often, but not necessarily, DTID as a repeated measures factor would be included in the MODEL statement. To be honest, I'm not sure what it means for DTID to be a continuous random effect (due to not being in MODEL) with an AR(1) covariance structure; perhaps someone else can weigh in on this point. I can imagine that you probably have a large number of unique DTID values.<BR />
<BR />
The third RANDOM statement probably is dramatically increasing the size of the Z matrix. Unless you have a lot of repeated measures on each deer, the quality of the estimates of these random effects may be very low. Although you would like to estimate them, in practice it may not be possible.<BR />
<BR />
You might try fitting a bare bones random structure for your model and then adding additional terms to see how far you can get. You can also compare the size of your X and Z matrices to those of your friend's model; yours may appear less complex but could actually be larger.<BR />
<BR />
Keep in mind that fitting a generalized (binary) linear mixed model is not the same as taking the normal-error version and replacing dist=normal with dist=binary, because the binary mean determines the binary variance whereas the normal mean and variance are separate estimates. This distinction impacts the specifications of the random factors.<BR />
<BR />
____________________________________________________________<BR />
<BR />
Using some of Susan's suggestions, I modified the model to the following: <BR />
<BR />
PROC GLIMMIX DATA=HABITAT; BY DN;<BR />
CLASS ID YEAR EXPOSURE TREAT HABVALUE;<BR />
MODEL VALUE (EVENT = '1') = EXPOSURE TREAT HABVALUE ROAD_LOG SLOPE SLOPE_QUAD ELEVATION ELEVATION_QUAD TREAT*EXPOSURE*HABVALUE TREAT*EXPOSURE*ROAD_LOG TREAT*EXPOSURE*ELEVATION TREAT*EXPOSURE*ELEVATION_QUAD TREAT*EXPOSURE*SLOPE TREAT*EXPOSURE*SLOPE_QUAD / DIST=BINARY LINK=LOGIT SOLUTION;<BR />
RANDOM ID ID(TREAT) TREAT(YEAR) YEAR / TYPE = VC;<BR />
RUN;<BR />
<BR />
<BR />
Unfortunately, I receive a different error message now:<BR />
<BR />
NOTE: The GLIMMIX procedure is modeling the probability that Value='1'.<BR />
]WARNING: Pseudo-likelihood update fails in outer iteration 3.<BR />
NOTE: Did not converge.<BR />
NOTE: The above message was for the following BY group:<BR />
DN=Diurnal<BR />
NOTE: The GLIMMIX procedure is modeling the probability that Value='1'.<BR />
NOTE: Convergence criterion (PCONV=1.11022E-8) satisfied.<BR />
NOTE: Estimated G matrix is not positive definite.<BR />
NOTE: The above message was for the following BY group:<BR />
DN=Nocturnal<BR />
NOTE: PROCEDURE GLIMMIX used (Total process time):<BR />
real time 24.95 seconds<BR />
cpu time 16.96 seconds<BR />
<BR />
Does anyone have any other suggestions to modify this model so I can effectively address my research questions? I'm not a season statistician so I'm unsure of what the "]WARNING: Pseudo-likelihood update fails in outer iteration 3" actually means and if there is a way to correct for this? In addition, what does "NOTE: Estimated G matrix is not positive definite" mean? How do you correct this problem? Thank you very much!Mon, 06 Jun 2011 18:23:05 GMThttps://communities.sas.com/t5/Statistical-Procedures/WARNING-Pseudo-likelihood-update-fails-in-outer-iteration-3/m-p/73011#M3512Buck14802011-06-06T18:23:05ZRe: Insufficient Memory
https://communities.sas.com/t5/Statistical-Procedures/Insufficient-Memory/m-p/70675#M3434
Thank you Susan! I'm using your suggestions to review the model structure to find the problem. I greatly appreciate your input and will let you know how the issue was solved.Tue, 31 May 2011 14:52:26 GMThttps://communities.sas.com/t5/Statistical-Procedures/Insufficient-Memory/m-p/70675#M3434Buck14802011-05-31T14:52:26ZRe: Insufficient Memory
https://communities.sas.com/t5/Statistical-Procedures/Insufficient-Memory/m-p/70673#M3432
TYPO: A friend of mine ran an even more complex dataset than mine using a normal desktop computer but for some reason I can't get the model to run correctly.Fri, 27 May 2011 17:44:53 GMThttps://communities.sas.com/t5/Statistical-Procedures/Insufficient-Memory/m-p/70673#M3432Buck14802011-05-27T17:44:53ZInsufficient Memory
https://communities.sas.com/t5/Statistical-Procedures/Insufficient-Memory/m-p/70672#M3431
Hi, I'm analyzing a complex, hierarchial dataset examining the habitat selection of animals. I'm using an analysis procedure that examines habitat selection by generating random GPS locations and pairing them with the actual animal location to model the probability of an animal using a resource. To start, I developed quadratic terms because animals often avoid the lowest and highest values associated with a given landscape feature. When modeling higher-order terms (i.e., quadratic) it is necessary to also include lower-order terms in the model. In the case of modeling a quadratic polynomial, the lower-order (linear) term represents the overall effect of the covariate; without including the linear term the covariate effect will be depicted as a monotonically increasing or decreasing parabola with minimum or maximum values at the origin (Darlington 1990). I also natural log-transformed road distance to allow for a decreasing magnitude of influence with increasing distance (i.e., non-linear association). To assure that a natural log transformation was not attempted on a cell with a value = 0, I added 0.1 to all original values (new = log(original + 0.1)).<BR />
<BR />
I ran a simple analysis this morning examining the slope and slope_quad (original value*original value) , elevation and elevation_quad (original value*original value) , distance to nearest road and log_distance to nearest road to see which model fit the data best (AIC model selection). Upon completing this simple analysis, I used the lowest AIC models to build a full model (see below):<BR />
<BR />
PROC GLIMMIX DATA=HABITAT;<BR />
CLASS ID YEAR EXPOSURE TREAT HABVALUE;<BR />
MODEL VALUE (EVENT = '1') = TREAT EXPOSURE HABVALUE ROAD_LOG ELEVATION ELEVATION_QUAD SLOPE SLOPE_QUAD TREAT*EXPOSURE*HABVALUE TREAT*EXPOSURE*ROAD_LOG TREAT*EXPOSURE*ELEVATION TREAT*EXPOSURE*ELEVATION_QUAD TREAT*EXPOSURE*SLOPE TREAT*EXPOSURE*SLOPE_QUAD / DIST=BINARY LINK=LOGIT SOLUTION;<BR />
RANDOM ID(TREAT) TREAT YEAR /TYPE=VC;<BR />
RANDOM DTID / TYPE = AR(1) SUBJECT=ID;<BR />
RANDOM ELEVATION SLOPE ROAD HABVALUE/ TYPE=VC SUBJECT=ID;<BR />
RUN;<BR />
<BR />
ID = Animal Identification (unique value)<BR />
YEAR = 2008 AND 2009<BR />
EXPOSURE: Initial and Prolong<BR />
TREAT: Control, Low, and High<BR />
HABVALUE: (1: Mixed forest/grassland; 2: Forest; 3: Grassland)<BR />
<BR />
RANDOM EFFECTS:<BR />
<BR />
RANDOM ID(TREAT) TREAT YEAR /TYPE=VC; <BR />
<BR />
/*MEANING SELECTION OF RESOURCES MADE BY A DEER ARE MORE SIMILAR OR CORRELATED WHEN EACH TREATMENT; TREATMENTS ARE SIMILAR FROM YEAR TO YEAR (ASSUMING THEY HAVE THE SAME INFLUENCE EVEN WHEN TREATMENTS WERE RANDOMLY ASSIGNED IN YEAR 2); YEARS ARE MORE SIMILAR THAN BETWEEN THE 2 YEARS*/<BR />
<BR />
RANDOM TIME / TYPE = AR(1) SUBJECT=ID; <BR />
<BR />
/*NEED TO HAVE A COLUMN THAT IS A CONTINUOUS VARIABLE THAT IS A DATE AND TIME INDICATOR (MERGE DATE AND TIME INTO 1 DATE/TIME STAMP, I CREATED THIS USING SAS); MODEL WITH AR(1); THIS WILL ACCOUNT FOR THE TEMPORAL AUTOCORRELATION IN THE DATASET FOR BOTH OBSERVED AND RANDOM LOCATIONS*/<BR />
<BR />
RANDOM ELEVATION SLOPE DIST_ROAD HABITAT / TYPE=VC SUBJECT=ID; <BR />
<BR />
/*THIS MODELS THE CORRELATION OF RESOURCE SELECTION WITHIN INDIVIDUALS - MEANING THE SELECTION OF ELEVATION BETWEEN INTERVALS IS CORRELATED WITHIN AN INDIVIDUAL; WITH TYPE=VC IT ALSO IS ASSUMING THAT THERE IS RANDOM SELECTION OF RESOURCES (IND. VARS.) AND THE IND. VARS. ARE NOT CORRELATED WITH OTHER IND. VARS.; STATED ANOTHER WAY - EACH ANIMAL HAS ITS OWN RELATIONSHIP WITH ELEVATION AND THESE RELATIONSHIPS ARE NORMALLY DISTRIBUTED AMONG ANIMAL; MODELING IT THIS WAY IS CLOSER TO ECOLOGICAL REALITY BECAUSE ANIMAL ARE A SAMPLE AND EACH ANIMAL IS USING A SAMPLE OF THE AVAILABLE ELEVATIONS*/<BR />
<BR />
<BR />
Unfortunately, when I run this model I continue to receive the following message:<BR />
<BR />
NOTE: The GLIMMIX procedure is modeling the probability that Value='1'.<BR />
ERROR: Integer overflow on computing amount of memory required.<BR />
NOTE: The SAS System stopped processing this step because of insufficient memory.<BR />
NOTE: PROCEDURE GLIMMIX used (Total process time):<BR />
real time 17.03 seconds<BR />
cpu time 6.04 seconds<BR />
<BR />
<BR />
I tried running this model on another computer with more RAM but with no luck. I believe the RANDOM effects are causing the problem of insufficient memory and may need to be revised somehow. A friend of mine ran even more complex datasets than mine using a normal desktop computer but for some reason I can get the model to run correctly. Any thoughts on how to resolve my problem? Thank you very much!Fri, 27 May 2011 17:41:59 GMThttps://communities.sas.com/t5/Statistical-Procedures/Insufficient-Memory/m-p/70672#M3431Buck14802011-05-27T17:41:59ZRe: Date and Time Stamps
https://communities.sas.com/t5/SAS-Procedures/Date-and-Time-Stamps/m-p/68585#M19663
So are you saying that I can't create the DATE2 column? The INFORMAT date and time are in the following format: Date = 11/22/2008 and Time = 09:22:26. My goal is to create a time stamp joining both date and time. I see your point about FORMAT and INFORMAT must be the same variable type but doesn't the code reflect that? Sorry for the confusion! Thank you very much for your help!Tue, 24 May 2011 15:13:42 GMThttps://communities.sas.com/t5/SAS-Procedures/Date-and-Time-Stamps/m-p/68585#M19663Buck14802011-05-24T15:13:42ZRe: Date and Time Stamps
https://communities.sas.com/t5/SAS-Procedures/Date-and-Time-Stamps/m-p/68583#M19661
Ok! I've read over the comments you posted below and still am a little confused. See my SAS code below:<BR />
<BR />
DATA DATETIME;<BR />
SET DEER1;<BR />
RUN;<BR />
<BR />
DATA CORRECT;<BR />
SET DATETIME; <BR />
INFORMAT DATE MMDDYY10.;<BR />
DATE2=DATE;<BR />
FORMAT DATE2 MMDDYY10.;<BR />
HRID=HMS(HOUR,MINUTE,SECOND); <BR />
H_M_S=HRID;<BR />
FORMAT H_M_S TIME.;<BR />
DTID=DHMS(DATE2,HOUR,MINUTE,SECOND);<BR />
RUN;<BR />
<BR />
PROC PRINT; RUN;<BR />
<BR />
DATA HABITAT; SET CORRECT; RUN;<BR />
<BR />
<BR />
<BR />
Do you see any inherent problems? I'm importing the data from an Excel file because I have approximately 100,000 lines of data and figured it would be easier to make sure things don't get jumbled up in the process of using DATALINES. I ran the code last night and kept getting the following errors: <BR />
<BR />
46573 DATA DATETIME;<BR />
46574 SET DEER1;<BR />
46575 RUN;<BR />
NOTE: There were 46492 observations read from the data set WORK.DEER1.<BR />
NOTE: The data set WORK.DATETIME has 46492 observations and 37 variables.<BR />
NOTE: DATA statement used (Total process time):<BR />
real time 0.10 seconds<BR />
cpu time 0.09 seconds<BR />
<BR />
46576 DATA CORRECT;<BR />
46577 SET DATETIME;<BR />
46578 INFORMAT DATE MMDDYY10.;<BR />
---------<BR />
48<BR />
ERROR 48-59: The informat $MMDDYY was not found or could not be loaded.<BR />
46579 DATE2=DATE;<BR />
46580 FORMAT DATE2 MMDDYY10.;<BR />
---------<BR />
48<BR />
ERROR 48-59: The format $MMDDYY was not found or could not be loaded. <BR />
46581 HRID=HMS(HOUR,MINUTE,SECOND);<BR />
46582 H_M_S=HRID;<BR />
46583 FORMAT H_M_S TIME.;<BR />
46584 DTID=DHMS(DATE2,HOUR,MINUTE,SECOND);<BR />
46585 RUN;<BR />
NOTE: Character values have been converted to numeric values at the places given by:<BR />
(Line):(Column).<BR />
46584:11<BR />
NOTE: The SAS System stopped processing this step because of errors.<BR />
WARNING: The data set WORK.CORRECT may be incomplete. When this step was stopped there were 0<BR />
observations and 41 variables.<BR />
NOTE: DATA statement used (Total process time):<BR />
real time 0.03 seconds<BR />
cpu time 0.06 seconds<BR />
<BR />
46586 PROC PRINT; RUN;<BR />
NOTE: No observations in data set WORK.CORRECT.<BR />
NOTE: PROCEDURE PRINT used (Total process time):<BR />
<BR />
<BR />
Thank you very much for any help that you can give me!Tue, 24 May 2011 14:43:22 GMThttps://communities.sas.com/t5/SAS-Procedures/Date-and-Time-Stamps/m-p/68583#M19661Buck14802011-05-24T14:43:22ZDate and Time Stamps
https://communities.sas.com/t5/SAS-Procedures/Date-and-Time-Stamps/m-p/68580#M19658
I'm trying to develop a column in my SAS dataset that combines both date and time into one column (Time1):<BR />
<BR />
Date Time Time1<BR />
11/22/2008 0:08:26 xxxxxxxxx<BR />
11/22/2008 0:16:26 xxxxxxxxx <BR />
11/22/2008 0:24:26 xxxxxxxxx<BR />
<BR />
so I can run an analysis accounting for temporal autocorrelation in my dataset. I saw a SAS article on combining date and time data together to give me the following format (ex. 1482223680). This is exactly what I need but I was unable to clearly follow how to derive this in my extensively large dataset (>=100,000 lines of data). Supposedly, the date represents days since 1/1/1960 and time represent seconds since midnight or midnight of 1/1/1960 if specifying a datetime variable. Does anyone know of an easy coding to create this date/time stamp based on two seperate columns (i.e., Date and time)? Thank you very much!Mon, 23 May 2011 19:09:42 GMThttps://communities.sas.com/t5/SAS-Procedures/Date-and-Time-Stamps/m-p/68580#M19658Buck14802011-05-23T19:09:42ZOutput Standard Deviation Rather than STDERR in GLIMMIX Solution for FE
https://communities.sas.com/t5/Statistical-Procedures/Output-Standard-Deviation-Rather-than-STDERR-in-GLIMMIX-Solution/m-p/62133#M2912
I'm working on standardizing my coeffient estimates for a report and need to use the standard deviation rather than the standard error. I know I can calculate by hand to get standard deviations but was hoping that a code may exist to output them faster. Thank you very much!Wed, 04 May 2011 16:46:56 GMThttps://communities.sas.com/t5/Statistical-Procedures/Output-Standard-Deviation-Rather-than-STDERR-in-GLIMMIX-Solution/m-p/62133#M2912Buck14802011-05-04T16:46:56ZPROC GLIMMIX Issue with Residuals
https://communities.sas.com/t5/Statistical-Procedures/PROC-GLIMMIX-Issue-with-Residuals/m-p/25250#M890
Hi, my name is Andy and I'm analyzing a large dataset using SAS Proc Glimmix<BR />
procedure. My dataset contains over 20,000 GPS records. I'm trying to<BR />
evaluate why certain deer were observed during hunting season thus I've coded<BR />
the deer that were observed with a "1" and those not observed with a "0." I<BR />
coded the entire our that the deer was observed to encompass any hunter<BR />
recording errors. My model is shown below: <BR />
<BR />
PROC GLIMMIX DATA=OBS METHOD=LAPLACE;<BR />
CLASS ID YEAR EXPOSURE HABITAT_VALUE;<BR />
MODEL OBSERVED (EVENT = '1') = EXPOSURE STEPLENGTH HABITAT_VALUE ELEVATION<BR />
DIST_NEAREST_ROAD / DIST=BINARY LINK=LOGIT SOLUTION;<BR />
RANDOM ID YEAR;<BR />
RUN;<BR />
<BR />
I want to see if the different independent variables influence the<BR />
observation of deer throughout the hunting season. My question is what are<BR />
the assumptions that I need to adhere to with logistic regression. I read<BR />
that the data does not need to be normally distributed. I know "steplength"<BR />
is extremely right skewed with the mean of 48 meters and a max value of 1,400<BR />
meters. If normality is not an issue then I assumed the next step would be to<BR />
at least examine the residuals and remove some of those extreme movements. I<BR />
added the PLOT=RESIDUALPANEL option to my model with ODS GRAPHICS and plotted<BR />
the residuals. The residuals looked very different than what I'd see in a<BR />
PROC MIXED model and I was unable to interpret the plots to determine if I<BR />
need to remove any outliers. Will I not receive a normal residual plot,<BR />
similar to PROC MIXED? If so, how do you interpret residual plots from PROC<BR />
GLIMMIX. Thank you very much!Wed, 09 Mar 2011 16:18:31 GMThttps://communities.sas.com/t5/Statistical-Procedures/PROC-GLIMMIX-Issue-with-Residuals/m-p/25250#M890Buck14802011-03-09T16:18:31ZRe: PROC GLIMMIX Issue with Residuals
https://communities.sas.com/t5/SAS-Procedures/PROC-GLIMMIX-Issue-with-Residuals/m-p/25316#M5713
Steve, <BR />
<BR />
Yes, ID refers to an individual deer. I tried running the model with different covariance structures such as: VC (default), CS, AR(1), and UN. The default covariance structure (VC) provided me with the best fit model based on AICc. I've tried running the spatial power covariance structure in MIXED when I was analyzing movement data but would receive an error message stating that it stopped because of an infinite likelihood. I determined that the error was due having multiple lines of data for one indvidual deer. Unfortunately, I wasn't sure how to overcome this and was told by a statistician to use another covariance structure. Thank you for your help!Wed, 09 Mar 2011 16:17:49 GMThttps://communities.sas.com/t5/SAS-Procedures/PROC-GLIMMIX-Issue-with-Residuals/m-p/25316#M5713Buck14802011-03-09T16:17:49ZPROC GLIMMIX Issue with Residuals
https://communities.sas.com/t5/SAS-Procedures/PROC-GLIMMIX-Issue-with-Residuals/m-p/25314#M5711
Hi, my name is Andy and I'm analyzing a large dataset using SAS Proc Glimmix<BR />
procedure. My dataset contains over 20,000 GPS records. I'm trying to<BR />
evaluate why certain deer were observed during hunting season thus I've coded<BR />
the deer that were observed with a "1" and those not observed with a "0." I<BR />
coded the entire our that the deer was observed to encompass any hunter<BR />
recording errors. My model is shown below: <BR />
<BR />
PROC GLIMMIX DATA=OBS METHOD=LAPLACE;<BR />
CLASS ID YEAR EXPOSURE HABITAT_VALUE;<BR />
MODEL OBSERVED (EVENT = '1') = EXPOSURE STEPLENGTH HABITAT_VALUE ELEVATION<BR />
DIST_NEAREST_ROAD / DIST=BINARY LINK=LOGIT SOLUTION;<BR />
RANDOM ID YEAR;<BR />
RUN;<BR />
<BR />
I want to see if the different independent variables influence the<BR />
observation of deer throughout the hunting season. My question is what are<BR />
the assumptions that I need to adhere to with logistic regression. I read<BR />
that the data does not need to be normally distributed. I know "steplength"<BR />
is extremely right skewed with the mean of 48 meters and a max value of 1,400<BR />
meters. If normality is not an issue then I assumed the next step would be to<BR />
at least examine the residuals and remove some of those extreme movements. I<BR />
added the PLOT=RESIDUALPANEL option to my model with ODS GRAPHICS and plotted<BR />
the residuals. The residuals looked very different than what I'd see in a<BR />
PROC MIXED model and I was unable to interpret the plots to determine if I<BR />
need to remove any outliers. Will I not receive a normal residual plot,<BR />
similar to PROC MIXED? If so, how do you interpret residual plots from PROC<BR />
GLIMMIX. Thank you very much!Wed, 09 Mar 2011 14:17:11 GMThttps://communities.sas.com/t5/SAS-Procedures/PROC-GLIMMIX-Issue-with-Residuals/m-p/25314#M5711Buck14802011-03-09T14:17:11Z