JiscMail Logo
Email discussion lists for the UK Education and Research communities

Help for BUGS Archives


BUGS Archives

BUGS Archives


BUGS@JISCMAIL.AC.UK


View:

Message:

[

First

|

Previous

|

Next

|

Last

]

By Topic:

[

First

|

Previous

|

Next

|

Last

]

By Author:

[

First

|

Previous

|

Next

|

Last

]

Font:

Monospaced Font

LISTSERV Archives

LISTSERV Archives

BUGS Home

BUGS Home

BUGS  2006

BUGS 2006

Options

Subscribe or Unsubscribe

Subscribe or Unsubscribe

Log In

Log In

Get Password

Get Password

Subject:

accelerated hazards

From:

l mm <[log in to unmask]>

Reply-To:

l mm <[log in to unmask]>

Date:

Sat, 21 Oct 2006 22:56:10 +0800

Content-Type:

text/plain

Parts/Attachments:

Parts/Attachments

text/plain (231 lines)

hi,

I use the code of model in congdon's book--applied bayesian
modeling(2003),example 9.5
by some modification for my AFT model as follows,and you can see what I do
only is that I modify the line # z[i] <- stain[i] ,I cancel it and in the
line for data input, I use z instead of stain.

Though model's checking,data's loading,as well as data's initing said ok,
when I began to update the model ,it said there were something wrong,I
donnot know how to find what's wrong with my model by the Trap window,will
you help me?

Thank you very much!!!

Jing


model {for (i in 1:n) {# model for mean
         
            
             mu[i] <- lambda * exp(gamma*beta*z[i])
# weibull sampling, survival and density
            t[i] ~ dweib(gamma,mu[i]) I(t.cen[i],)
           S[i] <- exp(-mu[i]*pow(t[i],gamma));
           f[i] <- mu[i]*gamma*pow(t[i],gamma-1)*S[i]
# likelihood
      Lk[i] <- pow(f[i],1-delta.cen[i])*pow(S[i],delta.cen[i]);
      logLk[i] <- log(Lk[i])
      G[i] <- 1/Lk[i]}
      Dev <- -2*sum(logLk[]);
# median survival with positive staining
t.50[1] <- pow(log(2)/(lambda*exp(gamma*beta)),1/gamma)
t.50[2] <- pow(log(2)/lambda,1/gamma)
#Priors
beta ~ dnorm(0,0.001)
gamma ~ dgamma(1,0.001)

# Hazard ratio under proportional hazards
HRPH <- exp(beta*gamma)

b0 ~ dnorm(0,0.00001)
lambda <- exp(b0)}


# Data
list(n=100,
t=c(465,776,1546,2490,3000,4241,5415,6107,7273,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,

150,167,179,192,250,251,270,305,329,341,372,391,560,630,702,707,754,826,835,NA,NA,NA,NA,NA,NA,

41,44,48,51,58,69,80,83,101,105,112,129,159,161,176,181,185,190,195,NA,NA,NA,NA,NA,NA,

2,3,7,7,8,10,12,13,14,16,18,21,31,34,35,40,42,43,48,50,56,75,NA,NA,NA),

t.cen=c(0,0,0,0,0,0,0,0,0,19930,19930,19930,19930,19930,19930,19930,19930,19930,19930,19930,19930,19930,19930,19930,19930,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1097,1097,1097,1097,1097,1097,

0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,245,245,245,245,245,245,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,90,90,90),

# positively stained coded 2

z=c(358,358,358,358,358,358,358,358,358,358,358,358,358,358,358,358,358,358,358,358,358,358,358,358,358,

398,398,398,398,398,398,398,398,398,398,398,398,398,398,398,398,398,398,398,398,398,398,398,398,398,

423,423,423,423,423,423,423,423,423,423,423,423,423,423,423,423,423,423,423,423,423,423,423,423,423,

448,448,448,448,448,448,448,448,448,448,448,448,448,448,448,448,448,448,448,448,448,448,448,448,448),


delta.cen=c(0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1))

Inits
list(beta=0,b0=0,gamma=1)
list(beta=1,b0=1,gamma=0.6)
list(beta=2.7,b0=0,gamma=1.2)



 What the trap window said are:



undefined real result

 GraphWeibull.Node.Likelihood [0000033DH]
.lambda REAL inf
.logLambda REAL inf
.logLikelihood REAL 0.0
.logR REAL 7.742443863477729
.node GraphWeibull.Node [010B9100H]
.r REAL 2304.09640520599
.x REAL inf
 UpdaterDFreeARS.Updater.Conditional [000000A6H]
.cond REAL -0.3960963410389164
.linearCoef REAL 0.0
.list GraphStochastic.List [01013DD0H]
.node GraphStochastic.Node [010B9100H]
.prior GraphStochastic.Node [010B7DA0H]
.quadCoef REAL 1.0E-5
.updater UpdaterDFreeARS.Updater [01089150H]
.x REAL 281.4591768050622
 UpdaterDFreeARS.Updater.Point [000000FEH]
.cursor GraphStochastic.List NIL
.h UpdaterDFreeARS.Hull Fields
.i INTEGER 0
.j INTEGER 2281960
.updater UpdaterDFreeARS.Updater [01089150H]
.x REAL 281.4591768050622
.y REAL 0.0
 UpdaterDFreeARS.StdUpdater.InitHull [00001833H]
.dum REAL 5.341769265574418E-315
.h UpdaterDFreeARS.Hull Fields
.res INTEGER 0
.updater UpdaterDFreeARS.StdUpdater [01089150H]
.x1 REAL 281.4591768050622
.x2 REAL 1.164257772131673E-313
.x3 REAL 5.234929664378671E-308
.x4 REAL 0.0
.xm REAL 5.311465294646351E-315
.y1 REAL 0.0
.y2 REAL 0.0
.y3 REAL 0.0
.y4 REAL 0.0
.ym REAL 0.0
 UpdaterDFreeARS.Updater.MCMC [00002DD7H]
.h UpdaterDFreeARS.Hull Fields
.i INTEGER 1668693535
.k INTEGER 1668612656
.oldValue REAL 281.4591768050622
.overRelax BOOLEAN FALSE
.prior GraphStochastic.Node [010B7DA0H]
.rand REAL 0.0
.res INTEGER 0
.updater UpdaterDFreeARS.Updater [01089150H]
.values POINTER NIL
 BugsUpdaters.Updater.MCMC [000005B8H]
.chain INTEGER 0
.depth INTEGER 1
.i INTEGER 0
.name BugsNames.Name [01034CA0H]
.ok BOOLEAN TRUE
.overRelax BOOLEAN FALSE
.res INTEGER 0
.size INTEGER 1
.string ARRAY 120 OF CHAR "" ...
.updater BugsUpdaters.Updater [01089060H]
 BugsSampler.MCMC [0000036DH]
.chain INTEGER 0
.cursor BugsSampler.List [01089D30H]
.depth INTEGER 1
.depth0 INTEGER 1
.depth1 INTEGER 2
.offset INTEGER 2287500
.ok BOOLEAN TRUE
.overRelax BOOLEAN FALSE
.updater BugsUpdaters.Updater [01089060H]
 BugsCmds.Action.Step [00000B1FH]
.a BugsCmds.Action [010F2370H]
.chain INTEGER 0
.i INTEGER 1
.j INTEGER 0
.numChains INTEGER 1
 BugsCmds.Action.Do [00000C58H]
.a BugsCmds.Action [010F2370H]
.elapsedTime LONGINT 632721F163260384H
.profileList ARRAY 2024 OF CHAR 0E814X, """ ...
.res INTEGER 1642746463
.s ARRAY 120 OF CHAR "" ...
 Services.Exec [00000136H]
.a Services.Action [010F2370H]
.t POINTER [63260384H]
 Services.IterateOverActions [000002F4H]
.p Services.Action [010F2370H]
.t POINTER NIL
.time LONGINT 49681468
 Services.StdHook.Step [0000034DH]
.h Services.StdHook [0101E380H]
 HostWindows.Idle [00004A86H]
.focus BOOLEAN FALSE
.tick Controllers.TickMsg Fields
.w HostWindows.Window NIL
 HostMenus.TimerTick [00003422H]
.lParam INTEGER 0
.ops Controllers.PollOpsMsg Fields
.wParam INTEGER 1
.wnd INTEGER 17236592
 Kernel.Try [00003A61H]
.a INTEGER 17236592
.b INTEGER 1
.c INTEGER 0
.h PROCEDURE HostMenus.TimerTick
 HostMenus.ApplWinHandler [00003841H]
.Proc PROCEDURE NIL
.hit BOOLEAN FALSE
.lParam INTEGER 0
.message INTEGER 275
.res INTEGER 4243644
.s ARRAY 256 OF SHORTCHAR "l"" ...
.w INTEGER 2147348480
.wParam INTEGER 1
.wnd INTEGER 17236592
<system> (pc=77D18708H, fp=0022FB84H)
<system> (pc=77D187EAH, fp=0022FBECH)
<system> (pc=77D189A4H, fp=0022FC4CH)
<system> (pc=77D1BCCBH, fp=0022FC5CH)
 HostMenus.Loop [00003BDEH]
.done BOOLEAN FALSE
.f SET {0..5}
.n INTEGER 0
.res INTEGER 0
.w HostWindows.Window NIL
 Kernel.Start [00002B8CH]
.code PROCEDURE HostMenus.Loop

_________________________________________________________________
MSN Explorer: http://explorer.msn.com/lccn/

-------------------------------------------------------------------
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

Top of Message | Previous Page | Permalink

JiscMail Tools


RSS Feeds and Sharing


Advanced Options


Archives

March 2020
February 2020
January 2020
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
May 2017
April 2017
March 2017
February 2017
January 2017
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
2006
2005
2004
2003
2002
2001
2000
1999
1998


JiscMail is a Jisc service.

View our service policies at https://www.jiscmail.ac.uk/policyandsecurity/ and Jisc's privacy policy at https://www.jisc.ac.uk/website/privacy-notice

Secured by F-Secure Anti-Virus CataList Email List Search Powered by the LISTSERV Email List Manager