[R] Finding data association in R

Bill.Venables at csiro.au Bill.Venables at csiro.au
Tue May 19 09:33:20 CEST 2009


Your problem is statistical and has nothing particularly to do with R.

It looks like homework to me.  

You may care to look at it this way:

###################

> fm <- glm(outcome ~ age, binomial, surgery)
> summary(fm)

Call:
glm(formula = outcome ~ age, family = binomial, data = surgery)

Deviance Residuals: 
    Min       1Q   Median       3Q      Max  
-1.6601  -0.8099  -0.5839   1.0491   1.7079  

Coefficients:
             Estimate Std. Error z value Pr(>|z|)
(Intercept) -10.48174    4.30409  -2.435   0.0149
age           0.16295    0.07018   2.322   0.0202

(Dispersion parameter for binomial family taken to be 1)

    Null deviance: 51.796  on 39  degrees of freedom
Residual deviance: 45.301  on 38  degrees of freedom
AIC: 49.301

Number of Fisher Scoring iterations: 3

###################
 
There are still a few questions left, of course.



Bill Venables
http://www.cmis.csiro.au/bill.venables/ 


-----Original Message-----
From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] On Behalf Of phen_ys
Sent: Tuesday, 19 May 2009 5:17 PM
To: r-help at r-project.org
Subject: Re: [R] Finding data association in R




Johannes Hüsing wrote:
> 
> 
> Am 19.05.2009 um 05:39 schrieb phen_ys:
> 
>>
>>> surgery <- data.frame(outcome = c(0, 0, 0, 0, 0, 0, 0, 0, 0,
>> + 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 0, 1, 0,
>> + 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0), age = c(50, 50, 51,
>> + 51, 53, 54, 54, 54, 55, 55, 56, 56, 56, 57, 57, 57, 57, 58,
>> + 59, 60, 61, 61, 61, 62, 62, 62, 62, 63, 63, 63, 64, 64, 65,
>> + 67, 67, 68, 68, 69, 70, 71))
>>
>> How to use R to find association of the death rate and age with the 
>> above
>> data?
>>
> 
> with(surgery, boxplot(age ~ outcome))
> 
> ______________________________________________
> 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.
> 
> 

I try to fit this into the model use lm function, but it doesn't make much
sense. The question i'm trying to answer is whether death rate is associated
with age. E.g the death rate is higher when the age is older.

-- 
View this message in context: http://www.nabble.com/Finding-data-association-in-R-tp23609249p23610952.html
Sent from the R help mailing list archive at Nabble.com.

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




More information about the R-help mailing list