Hi Kyong,
Even if it is not -as can be inferred from what you said- a homework or
assignment related query (and the group has clear policy against such requests),
the questions you posed have nontheless very little to do specifically with R.
Instead, they are about statistics. In this respect, I would suggest then you
read "Data Analysis Using Regression and Multilevel/Hierarchical
Models" by Andrew Gelman and Jennifer Hill, which covers these issues.
Regards,
Jos?
-----Original Message-----
From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org]
On Behalf Of kyong park
Sent: 09 January 2013 14:38
To: R forum
Subject: [R] Need an advise for bayesian estimate
Hi R bayesians,
I need an advise how to resolve the two different estimates applying a
traditional glm (TG) and a bayes glm (BG), and different results depending
on the data formats of response data and the prior specs using bayesglm in
R. I'm not familiar with bayes estimate and my colleague asked me to look
into this because the EPA from France reported a quite different estimates
for the follwoing ethylene data applying bayes method using MCSIM. As seen
below glm give same results regardless of response data format, i.e.,
two-column or binary formats, but bayesglm would give different results.
The result from French report is -91.78+8*lnC+6.055*lnT which lie
between prior.df=1 and 2 appling binary data format in R.
My question are as follows:
1. What is advantage using bayes estimate? Is it better for small samples?
2. How to resolve different estimates depending on the format of response
data, and the prior specs (Ex: prior.df)?
3.Should we use interval estimate rather than point estimate for BG?
Two-Column format:
cppm Tmin lnC lnT Death Number
1 1850 240 7.52294 5.48064 5 5
2 1637 240 7.40062 5.48064 4 5
3 1443 240 7.27448 5.48064 1 5
4 1021 240 6.92854 5.48064 0 5
5 4827 60 8.48198 4.09434 5 5
6 4202 60 8.34332 4.09434 1 5
7 4064 60 8.30992 4.09434 5 5
8 3966 60 8.28551 4.09434 2 5
9 3609 60 8.19119 4.09434 0 5
Binary data format:
cppm Tmin lnC lnT resp
1 1850 240 7.52294 5.48064 1
2 1850 240 7.52294 5.48064 1
3 1850 240 7.52294 5.48064 1
4 1850 240 7.52294 5.48064 1
5 1850 240 7.52294 5.48064 1
6 1637 240 7.40062 5.48064 1
7 1637 240 7.40062 5.48064 1
8 1637 240 7.40062 5.48064 1
9 1637 240 7.40062 5.48064 1
10 1637 240 7.40062 5.48064 0
11 1443 240 7.27448 5.48064 1
12 1443 240 7.27448 5.48064 0
13 1443 240 7.27448 5.48064 0
14 1443 240 7.27448 5.48064 0
attach(ehtylene)
DL<-cbind(Death,Alive=Number-Death)
Call:
glm(formula = DL ~ lnC + lnT, family = binomial(link = "probit"),
data = ethylene)
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -145.156 43.668 -3.324 0.000887 ***
lnC 12.972 3.918 3.311 0.000931 ***
lnT 9.122 2.736 3.335 0.000854 ***
Using binary data:
Call:
glm(formula = resp ~ lnC + lnT, family = binomial(link = "probit"),
data = ethylene.mod)
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -145.157 43.670 -3.324 0.000887 ***
lnC 12.972 3.918 3.311 0.000931 ***
lnT 9.122 2.736 3.334 0.000855 ***
Using bayesglm with two-column data:
summary(result3)
Call:
bayesglm(formula = DL ~ lnC + lnT, family = binomial(link = "probit"),
data = ethylene)
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -134.971 17.490 -7.717 1.19e-14 ***
lnC 12.060 1.570 7.680 1.59e-14 ***
lnT 8.485 1.095 7.751 9.11e-15 ***
Using bayesglm with binary data:
Call:
bayesglm(formula = resp ~ lnC + lnT, family = binomial(link =
"probit"),
data = ethylene.mod)
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -98.477 26.919 -3.658 0.000254 ***
lnC 8.792 2.423 3.628 0.000286 ***
lnT 6.208 1.681 3.694 0.000221 ***
[[alternative HTML version deleted]]
______________________________________________
R-help at r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Wrap Up and Run 10k is back!
Also, new for 2013 ? 2km intergenerational walks at selected venues. So recruit
a buddy, dust off the trainers and beat the winter blues by
signing up now:
http://www.ageuk.org.uk/10k
Milton Keynes | Oxford | Sheffield | Crystal Palace | Exeter |
Harewood House, Leeds |
Tatton Park, Cheshire | Southampton | Coventry
Age UK Improving later life
http://www.ageuk.org.uk
-------------------------------
Age UK is a registered charity and company limited by guarantee, (registered
charity number 1128267, registered company number 6825798).
Registered office: Tavis House, 1-6 Tavistock Square, London WC1H 9NA.
For the purposes of promoting Age UK Insurance, Age UK is an Appointed
Representative of Age UK Enterprises Limited, Age UK is an Introducer
Appointed Representative of JLT Benefit Solutions Limited and Simplyhealth
Access for the purposes of introducing potential annuity and health
cash plans customers respectively. Age UK Enterprises Limited, JLT Benefit
Solutions Limited and Simplyhealth Access are all authorised and
regulated by the Financial Services Authority.
------------------------------
This email and any files transmitted with it are confidential and intended
solely for the use of the individual or entity to whom they are
addressed. If you receive a message in error, please advise the sender and
delete immediately.
Except where this email is sent in the usual course of our business, any
opinions expressed in this email are those of the author and do not
necessarily reflect the opinions of Age UK or its subsidiaries and associated
companies. Age UK monitors all e-mail transmissions passing
through its network and may block or modify mails which are deemed to be
unsuitable.
Age Concern England (charity number 261794) and Help the Aged (charity number
272786) and their trading and other associated companies merged
on 1st April 2009. Together they have formed the Age UK Group, dedicated to
improving the lives of people in later life. The three national
Age Concerns in Scotland, Northern Ireland and Wales have also merged with Help
the Aged in these nations to form three registered charities:
Age Scotland, Age NI, Age Cymru.