May, Roel
2006-Mar-24 15:49 UTC
[R] Clustering over strata using a Cox proportional hazard model
Hi all, I wish to do build discrete choice model to analyse habitat selection of wolverines. This can be done with a 'tricked' stratified Cox proportional hazard model. For each individual animal each selected position, and possible alternative non-used available positions are combined into strata. This means that one stratum contains a set of 1 used position and several positions which were available to the animal but were not selected. Ultimately this renders unique choice sets for all observations in the dataset. The stratified model works fine and does its work as should. The problem however is that, having checked the residuals, there is a high variation between individuals. Is it somehow possible to account for preferences that vary among individuals? I am thinking along the lines of clustering the data over the strata or using specific individual weights. I have looked into the cluster() function, but this does not result in any differences in the residuals. If using the cluster() function is the right way to take, how can I check if it worked to remove individual preferences? I hope anyone can help me with this, Thankes in advance, Roel May Roel May Norwegian Wolverine Project Norwegian Institute for Nature Research (NINA) Tungasletta 2, N-7485 Trondheim, Norway Tlf. +47 73 80 14 65, Mob. +47 95 78 59 95 Email roel.may at nina.no <mailto:roel.may at nina.no> Internett www.nina.no <http://www.nina.no/> , www.jerv.info <http://www.jerv.info/>
Thomas Lumley
2006-Mar-24 17:11 UTC
[R] Clustering over strata using a Cox proportional hazard model
On Fri, 24 Mar 2006, May, Roel wrote:> Hi all, > > I wish to do build discrete choice model to analyse habitat selection of > wolverines. > This can be done with a 'tricked' stratified Cox proportional hazard > model. > For each individual animal each selected position, and possible > alternative non-used available positions are combined into strata. > This means that one stratum contains a set of 1 used position and > several positions which were available to the animal but were not > selected. > Ultimately this renders unique choice sets for all observations in the > dataset. > The stratified model works fine and does its work as should.You could also have used clogit(), which does exactly this.> The problem however is that, having checked the residuals, there is a > high variation between individuals. > Is it somehow possible to account for preferences that vary among > individuals? I am thinking along the lines of clustering the data over > the strata or using specific individual weights. I have looked into the > cluster() function, but this does not result in any differences in the > residuals. If using the cluster() function is the right way to take, how > can I check if it worked to remove individual preferences?cluster() affects only the standard error computations. It uses the Huber/White "sandwich" standard error estimates, which consistently estimate the actual standard error of your estimate. You can think of them as a bargain-basement version of bootstrapping. In some situations this is all you need, because the correlation does not prevent a sensible interpretation of your regression coefficients. In other cases you want a different model that will give different regression coefficients. -thomas Thomas Lumley Assoc. Professor, Biostatistics tlumley at u.washington.edu University of Washington, Seattle