Email discussion lists for the UK Education and Research communities

## BUGS@JISCMAIL.AC.UK

#### View:

 Message: [ First | Previous | Next | Last ] By Topic: [ First | Previous | Next | Last ] By Author: [ First | Previous | Next | Last ] Font: Proportional Font

#### Options

Subject:

Set a restriction for a hierarchical model

From:

Date:

Thu, 4 Oct 2007 19:28:14 +0100

Content-Type:

text/plain

Parts/Attachments:

 text/plain (83 lines)
 ```Dear All, I try to estimate parameters of a growth model using tag-recapture data. In the following program, SL1 and SL2 are the lengths of animals at taggings and recaptures respectively, and DT is the length of time (in years) between the tagging and recapture. There are two growth model parameters, SLinf and k. SLinf is the asymptotic length (theoretic limit of animals' growth),and k is a growth rate coefficient. I assume that each animal has its own SLinf and k, and both SLinf and k are exchangeable among the animal population. Thus, I constructed a hierarchical model. Ideally, individual SLinf should be larger than the corresponding L1 and L2. However, the estimated means of some SLinf (such as SLinf[1], SLinf[6] etc.) are considerably smaller than L1s and L2s. Are there any ways to make sure that estimates of individual SLinf are not smaller than SL2? Any helps and comments are greatly appreciated. Zane model{ for (j in 1:n) { SL2[j] ~ dnorm(SL2_Exp[j], tau) SL2_Exp[j] <- SLinf[j] - Lr[j]*exp(-k[j]*DT[j]) Lr[j] ~ dnorm(Lr_Exp[j], tau) Lr_Exp[j] <- SLinf[j] - SL1[j] SLinf[j] ~ dnorm(SLinf_mu, SLinf_tau) k[j] ~ dnorm(k_mu, k_tau) } SLinf_mu ~ dnorm(80, 0.0001) SLinf_tau ~ dgamma(0.001, 0.0001) k_mu ~ dnorm(0.3, 0.001) k_tau ~ dgamma(0.001, 0.0001) tau ~ dgamma(0.001, 0.0001) } #Initial values list(k_mu = 0.4, k_tau = 10,SLinf_mu = 100, SLinf_tau = 10, tau = 0.001) list(n=81, # number of data sets  # Shell length at tagging SL1=c(102, 97, 80, 86, 70, 111, 75, 68, 87, 82, 62, 63, 94, 69, 60, 50, 65, 59, 68, 74, 102, 76, 95, 73, 88, 106, 91, 83, 93, 66, 56, 73, 45, 91, 66, 67, 72, 75, 86, 86, 77, 80, 88, 63, 67, 63, 81, 73, 78, 59, 104, 90, 69, 80, 71, 89, 105, 87, 70, 76, 84, 65, 73, 82, 93, 69, 58, 81, 69, 76, 88, 76, 66, 68, 69, 85, 82, 97, 73, 80, 82 ), # Shell increment at recapture SL2 = c(104, 98, 81, 100, 77, 110, 82, 78, 92, 80, 64, 75, 93, 75, 67, 58, 74, 70, 77, 84, 103, 81, 94, 79, 90, 106, 94, 80, 96, 80, 74, 92, 70, 93, 84, 95, 87, 95, 89, 90, 78, 80, 91, 68, 75, 71, 83, 77, 82, 82, 106, 95, 75, 84, 74, 89, 106, 88, 76, 89, 96, 81, 87, 87, 94, 84, 77, 91, 84, 82, 95, 81, 81, 85, 82, 96, 93, 97, 94, 88, 97), # Time interval (in years) the tagged abalone at liberty DT = c(0.273972602739726, 0.273972602739726, 0.273972602739726, 0.265753424657534, 0.265753424657534, 0.265753424657534, 0.265753424657534, 0.265753424657534, 0.265753424657534, 0.265753424657534, 0.265753424657534, 0.265753424657534, 0.265753424657534, 0.265753424657534, 0.265753424657534, 0.265753424657534, 0.265753424657534, 0.265753424657534, 0.265753424657534, 0.265753424657534, 0.282191780821918, 0.282191780821918, 0.287671232876712, 0.287671232876712, 0.287671232876712, 0.287671232876712, 0.284931506849315, 0.284931506849315, 0.284931506849315, 0.967123287671233, 0.967123287671233, 0.96986301369863, 0.96986301369863, 1.25479452054795, 1.25753424657534, 1.25753424657534, 1.25753424657534, 1.25753424657534, 1.25753424657534, 0.265753424657534, 0.265753424657534, 0.265753424657534, 0.265753424657534, 0.265753424657534, 0.265753424657534, 0.265753424657534, 0.265753424657534, 0.265753424657534, 0.265753424657534, 0.265753424657534, 1.24657534246575, 0.268493150684932, 0.268493150684932, 0.268493150684932, 0.268493150684932, 0.268493150684932, 0.268493150684932, 0.268493150684932, 0.268493150684932, 1.26575342465753, 1.26575342465753, 1.24931506849315, 1.24931506849315, 1.26301369863014, 1.26301369863014, 1.03013698630137, 1.03013698630137, 1.1041095890411, 1.1041095890411, 1.1041095890411, 1.1041095890411, 1.1041095890411, 1.1041095890411, 1.1041095890411, 1.1041095890411, 2.1041095890411, 2.1041095890411, 2.1041095890411, 2.1041095890411, 2.1041095890411, 4.12876712328767)) ------------------------------------------------------------------- This list is for discussion of modelling issues and the BUGS software. For help with crashes and error messages, first mail [log in to unmask] To mail the BUGS list, mail to [log in to unmask] Before mailing, please check the archive at www.jiscmail.ac.uk/lists/bugs.html Please do not mail attachments to the list. To leave the BUGS list, send LEAVE BUGS to [log in to unmask] If this fails, mail [log in to unmask], NOT the whole list ```