SlideShare una empresa de Scribd logo
1 de 5
Descargar para leer sin conexión
The BUGS Software
Andrew Thomas
MRC Biostatistics Unit, Cambridge Institute of Public Health
Urbana-Champaign, 25th March 2014
Andrew Thomas (MRC-BSU,) Urbana-Champaign, March 2014 1 / 5
Giving the model to the computer
for(i IN 1 : N)
for(j IN 1 : T)
sigma
tau.c
x[j]
Y[i, j]
mu[i, j]
beta[i]alpha[i]
beta.taubeta.calpha0alpha.calpha.tau
Andrew Thomas (MRC-BSU,) Urbana-Champaign, March 2014 2 / 5
In more conventional form
model
{
for( i in 1 : N ) {
for( j in 1 : T ) {
Y[i , j] ~ dnorm(mu[i , j],tau.c)
mu[i , j] <- alpha[i] + beta[i] * (x[j] - xbar)
}
alpha[i] ~ dnorm(alpha.c,alpha.tau)
beta[i] ~ dnorm(beta.c,beta.tau)
}
tau.c ~ dgamma(0.001,0.001)
sigma <- 1 / sqrt(tau.c)
alpha.c ~ dnorm(0.0,1.0E-6)
alpha.tau ~ dgamma(0.001,0.001)
beta.c ~ dnorm(0.0,1.0E-6)
beta.tau ~ dgamma(0.001,0.001)
alpha0 <- alpha.c - xbar * beta.c
}
Andrew Thomas (MRC-BSU,) Urbana-Champaign, March 2014 3 / 5
And some data
list(x = c(8.0, 15.0, 22.0, 29.0, 36.0), xbar = 22, N = 30, T = 5,
Y = structure(
.Data = c(151, 199, 246, 283, 320,
145, 199, 249, 293, 354,
147, 214, 263, 312, 328,
155, 200, 237, 272, 297,
135, 188, 230, 280, 323,
159, 210, 252, 298, 331,
141, 189, 231, 275, 305,
159, 201, 248, 297, 338,
177, 236, 285, 350, 376,
134, 182, 220, 260, 296,
160, 208, 261, 313, 352,
143, 188, 220, 273, 314,
154, 200, 244, 289, 325,
171, 221, 270, 326, 358,
163, 216, 242, 281, 312,
160, 207, 248, 288, 324,
142, 187, 234, 280, 316,
156, 203, 243, 283, 317,
157, 212, 259, 307, 336,
152, 203, 246, 286, 321,
154, 205, 253, 298, 334,
139, 190, 225, 267, 302,
146, 191, 229, 272, 302,
157, 211, 250, 285, 323,
132, 185, 237, 286, 331,
160, 207, 257, 303, 345,
169, 216, 261, 295, 333,
157, 205, 248, 289, 316,
137, 180, 219, 258, 291,
153, 200, 244, 286, 324),
.Dim = c(30,5)))
Andrew Thomas (MRC-BSU,) Urbana-Champaign, March 2014 4 / 5
Computer gives some inferences
mean median sd MC_error val2.5pc val97.5pc start sample ESS
alpha0 106.6 106.6 3.639 0.02987 99.33 113.7 1001 20000 14840
beta.c 6.186 6.186 0.1081 9.707E-4 5.975 6.399 1001 20000 12389
sigma 6.099 6.065 0.4681 0.005405 5.265 7.111 1001 20000 7500
alpha0 sample: 20000
alpha0
90.0 100.0 110.0 120.0
P(alpha0)
0.00.1
beta.c sample: 20000
beta.c
5.5 5.75 6.0 6.25 6.5
P(beta.c)
0.02.04.0
sigma sample: 20000
sigma
4.0 6.0 8.0
P(sigma)
0.00.51.0
iteration
1000 2500 5000 7500 10000
alpha0
90.0110.0130.0
Andrew Thomas (MRC-BSU,) Urbana-Champaign, March 2014 5 / 5

Más contenido relacionado

Más de David LeBauer

Software and data as scaffolds for integrative science
Software and data as scaffolds for integrative scienceSoftware and data as scaffolds for integrative science
Software and data as scaffolds for integrative scienceDavid LeBauer
 
Reusable Software and Open Data To Optimize Agriculture
Reusable Software and Open Data To Optimize AgricultureReusable Software and Open Data To Optimize Agriculture
Reusable Software and Open Data To Optimize AgricultureDavid LeBauer
 
Matt Jones software-interoperability
Matt Jones software-interoperabilityMatt Jones software-interoperability
Matt Jones software-interoperabilityDavid LeBauer
 
Aaron Ellison: Analytic Web
Aaron Ellison: Analytic WebAaron Ellison: Analytic Web
Aaron Ellison: Analytic WebDavid LeBauer
 
Ilkay Altintas: Kepler
Ilkay Altintas: KeplerIlkay Altintas: Kepler
Ilkay Altintas: KeplerDavid LeBauer
 
Aaron Ellison Keynote: Reaching the 99%
Aaron Ellison Keynote: Reaching the 99%Aaron Ellison Keynote: Reaching the 99%
Aaron Ellison Keynote: Reaching the 99%David LeBauer
 
Anders Nielsen AD Model-Builder
Anders Nielsen AD Model-BuilderAnders Nielsen AD Model-Builder
Anders Nielsen AD Model-BuilderDavid LeBauer
 
Janine Illian R-INLA
Janine Illian R-INLAJanine Illian R-INLA
Janine Illian R-INLADavid LeBauer
 
Anders Nielsen template model-builder
Anders Nielsen template model-builderAnders Nielsen template model-builder
Anders Nielsen template model-builderDavid LeBauer
 
Advancing Software for Ecological Forecasting: Public Sessions
Advancing Software for Ecological Forecasting: Public SessionsAdvancing Software for Ecological Forecasting: Public Sessions
Advancing Software for Ecological Forecasting: Public SessionsDavid LeBauer
 
Advancing software for ecological forecasting
Advancing software for ecological forecastingAdvancing software for ecological forecasting
Advancing software for ecological forecastingDavid LeBauer
 

Más de David LeBauer (20)

Software and data as scaffolds for integrative science
Software and data as scaffolds for integrative scienceSoftware and data as scaffolds for integrative science
Software and data as scaffolds for integrative science
 
Reusable Software and Open Data To Optimize Agriculture
Reusable Software and Open Data To Optimize AgricultureReusable Software and Open Data To Optimize Agriculture
Reusable Software and Open Data To Optimize Agriculture
 
Yiqi Luo EcoPAD
Yiqi Luo EcoPADYiqi Luo EcoPAD
Yiqi Luo EcoPAD
 
David LeBauer PEcAn
David LeBauer PEcAnDavid LeBauer PEcAn
David LeBauer PEcAn
 
David Kelly SWIFT
David Kelly SWIFTDavid Kelly SWIFT
David Kelly SWIFT
 
Matt Jones software-interoperability
Matt Jones software-interoperabilityMatt Jones software-interoperability
Matt Jones software-interoperability
 
Aaron Ellison: Analytic Web
Aaron Ellison: Analytic WebAaron Ellison: Analytic Web
Aaron Ellison: Analytic Web
 
Ilkay Altintas: Kepler
Ilkay Altintas: KeplerIlkay Altintas: Kepler
Ilkay Altintas: Kepler
 
Aaron Ellison Keynote: Reaching the 99%
Aaron Ellison Keynote: Reaching the 99%Aaron Ellison Keynote: Reaching the 99%
Aaron Ellison Keynote: Reaching the 99%
 
Martyn Plummer JAGS
Martyn Plummer JAGSMartyn Plummer JAGS
Martyn Plummer JAGS
 
Anders Nielsen AD Model-Builder
Anders Nielsen AD Model-BuilderAnders Nielsen AD Model-Builder
Anders Nielsen AD Model-Builder
 
Daniel Lee STAN
Daniel Lee STANDaniel Lee STAN
Daniel Lee STAN
 
Ed Ionides POMP
Ed Ionides POMPEd Ionides POMP
Ed Ionides POMP
 
Janine Illian R-INLA
Janine Illian R-INLAJanine Illian R-INLA
Janine Illian R-INLA
 
Andy Fox DART
Andy Fox DARTAndy Fox DART
Andy Fox DART
 
Mike Dietze PEcAn
Mike Dietze PEcAnMike Dietze PEcAn
Mike Dietze PEcAn
 
de Valpine NIMBLE
de Valpine NIMBLEde Valpine NIMBLE
de Valpine NIMBLE
 
Anders Nielsen template model-builder
Anders Nielsen template model-builderAnders Nielsen template model-builder
Anders Nielsen template model-builder
 
Advancing Software for Ecological Forecasting: Public Sessions
Advancing Software for Ecological Forecasting: Public SessionsAdvancing Software for Ecological Forecasting: Public Sessions
Advancing Software for Ecological Forecasting: Public Sessions
 
Advancing software for ecological forecasting
Advancing software for ecological forecastingAdvancing software for ecological forecasting
Advancing software for ecological forecasting
 

Último

Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityIES VE
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterMydbops
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationKnoldus Inc.
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfIngrid Airi González
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Farhan Tariq
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsRavi Sanghani
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesThousandEyes
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfNeo4j
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfpanagenda
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demoHarshalMandlekar2
 
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Scott Andery
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 

Último (20)

Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL Router
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog Presentation
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdf
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and Insights
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdf
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demo
 
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 

Andrew Thomas OpenBUGS

  • 1. The BUGS Software Andrew Thomas MRC Biostatistics Unit, Cambridge Institute of Public Health Urbana-Champaign, 25th March 2014 Andrew Thomas (MRC-BSU,) Urbana-Champaign, March 2014 1 / 5
  • 2. Giving the model to the computer for(i IN 1 : N) for(j IN 1 : T) sigma tau.c x[j] Y[i, j] mu[i, j] beta[i]alpha[i] beta.taubeta.calpha0alpha.calpha.tau Andrew Thomas (MRC-BSU,) Urbana-Champaign, March 2014 2 / 5
  • 3. In more conventional form model { for( i in 1 : N ) { for( j in 1 : T ) { Y[i , j] ~ dnorm(mu[i , j],tau.c) mu[i , j] <- alpha[i] + beta[i] * (x[j] - xbar) } alpha[i] ~ dnorm(alpha.c,alpha.tau) beta[i] ~ dnorm(beta.c,beta.tau) } tau.c ~ dgamma(0.001,0.001) sigma <- 1 / sqrt(tau.c) alpha.c ~ dnorm(0.0,1.0E-6) alpha.tau ~ dgamma(0.001,0.001) beta.c ~ dnorm(0.0,1.0E-6) beta.tau ~ dgamma(0.001,0.001) alpha0 <- alpha.c - xbar * beta.c } Andrew Thomas (MRC-BSU,) Urbana-Champaign, March 2014 3 / 5
  • 4. And some data list(x = c(8.0, 15.0, 22.0, 29.0, 36.0), xbar = 22, N = 30, T = 5, Y = structure( .Data = c(151, 199, 246, 283, 320, 145, 199, 249, 293, 354, 147, 214, 263, 312, 328, 155, 200, 237, 272, 297, 135, 188, 230, 280, 323, 159, 210, 252, 298, 331, 141, 189, 231, 275, 305, 159, 201, 248, 297, 338, 177, 236, 285, 350, 376, 134, 182, 220, 260, 296, 160, 208, 261, 313, 352, 143, 188, 220, 273, 314, 154, 200, 244, 289, 325, 171, 221, 270, 326, 358, 163, 216, 242, 281, 312, 160, 207, 248, 288, 324, 142, 187, 234, 280, 316, 156, 203, 243, 283, 317, 157, 212, 259, 307, 336, 152, 203, 246, 286, 321, 154, 205, 253, 298, 334, 139, 190, 225, 267, 302, 146, 191, 229, 272, 302, 157, 211, 250, 285, 323, 132, 185, 237, 286, 331, 160, 207, 257, 303, 345, 169, 216, 261, 295, 333, 157, 205, 248, 289, 316, 137, 180, 219, 258, 291, 153, 200, 244, 286, 324), .Dim = c(30,5))) Andrew Thomas (MRC-BSU,) Urbana-Champaign, March 2014 4 / 5
  • 5. Computer gives some inferences mean median sd MC_error val2.5pc val97.5pc start sample ESS alpha0 106.6 106.6 3.639 0.02987 99.33 113.7 1001 20000 14840 beta.c 6.186 6.186 0.1081 9.707E-4 5.975 6.399 1001 20000 12389 sigma 6.099 6.065 0.4681 0.005405 5.265 7.111 1001 20000 7500 alpha0 sample: 20000 alpha0 90.0 100.0 110.0 120.0 P(alpha0) 0.00.1 beta.c sample: 20000 beta.c 5.5 5.75 6.0 6.25 6.5 P(beta.c) 0.02.04.0 sigma sample: 20000 sigma 4.0 6.0 8.0 P(sigma) 0.00.51.0 iteration 1000 2500 5000 7500 10000 alpha0 90.0110.0130.0 Andrew Thomas (MRC-BSU,) Urbana-Champaign, March 2014 5 / 5