[R] quwstion about elrm package for Exact Logistic Regrassion

Masoud masoud.yousefi at ubc.ca
Tue Jun 30 23:48:13 CEST 2009


Hi 
 I am a new R user and I did try elrm package to do Exact Logistic
regression for my dataset ( about 170 patients with a binary dependent
variable against age and 6 other binary covariates), I did not have n column
because it was about individuals, I made n column with 1 for each
individual, here is my code and result:


> 
> #### Libraries needed ####
> 
> library("elrm")
Loading required package: coda
Loading required package: lattice
> 
> 
> #### Indicate your default directory ####
> 
> 
> my.directory <- "C:/Users/Masoud/Desktop/r/"
> #my.directory <- "C:/Documents and Settings/laurent/My
> Documents/Bioinfo_workshop/"
> setwd("C:/Users/Masoud/Desktop/r/")
> 
> #### Read data ####
> 
> 
> 
> PAD1 <- read.delim("C:/Users/Masoud/Desktop/r/PAD.txt", header=TRUE)
> 
> attach(PAD1)
> 
> head(PAD1)
    Code PAD Age High_ratio Smoke DM1_2 HT HxVasc PI_NonPI n
1 EE-001   0  46          0     1     0  0      0        1 1
2 SK-002   0  56          1     0     0  1      1        1 1
3 EP-003   0  52          0     0     0  0      0        1 1
4 TS-004   0  48          0     0     1  1      0        1 1
5 XS-005   1  65          0     1     1  1      1        1 1
6 UG-006   1  51          0     1     1  1      1        1 1
> 
> PAD ~ Age + High_ratio + DM1_2 + HT + HxVasc + PI_NonPI + Smoke
PAD ~ Age + High_ratio + DM1_2 + HT + HxVasc + PI_NonPI + Smoke
> 
> simPAD.elrm <- elrm(PAD/n ~ Age + High_ratio + DM1_2 + HT + HxVasc +
> PI_NonPI + Smoke, interest = ~Age + High_ratio + DM1_2 + HT + HxVasc +
> PI_NonPI + Smoke, iter = 700000, burnIn = 800, alpha = 0.05, dataset =
> PAD1)
Generating the Markov chain ...
Progress: 100%  
Generation of the Markov Chain required 9.7667 mins
Conducting inference ...
Inference required 1.2167 mins
Warning messages:
1: 'Age' conditional distribution of the sufficient statistic was found to
be degenerate 
2: 'High_ratio' conditional distribution of the sufficient statistic was
found to be degenerate 
3: 'DM1_2' conditional distribution of the sufficient statistic was found to
be degenerate 
4: 'HT' conditional distribution of the sufficient statistic was found to be
degenerate 
5: 'HxVasc' conditional distribution of the sufficient statistic was found
to be degenerate 
6: 'PI_NonPI' conditional distribution of the sufficient statistic was found
to be degenerate 
7: 'Smoke' conditional distribution of the sufficient statistic was found to
be degenerate 
> 
> summary(simPAD.elrm)

Call:
[[1]]
elrm(formula = PAD/n ~ Age + High_ratio + DM1_2 + HT + HxVasc + 
    PI_NonPI + Smoke, interest = ~Age + High_ratio + DM1_2 + 
    HT + HxVasc + PI_NonPI + Smoke, iter = 7e+05, dataset = PAD1, 
    burnIn = 800, alpha = 0.05)


Results:
           estimate p-value p-value_se mc_size
joint            NA 0.18251    0.01144  699200
Age              NA      NA         NA     553
High_ratio       NA      NA         NA     553
DM1_2            NA      NA         NA     553
HT               NA      NA         NA     553
HxVasc           NA      NA         NA     553
PI_NonPI         NA      NA         NA     553
Smoke            NA      NA         NA     553

95% Confidence Intervals for Parameters

           lower upper
Age           NA    NA
High_ratio    NA    NA
DM1_2         NA    NA
HT            NA    NA
HxVasc        NA    NA
PI_NonPI      NA    NA
Smoke         NA    NA





I did use update command a couple of times yet no better result, do you know
what I need to do for getting confidence intervals for my covariates?


-- 
View this message in context: http://www.nabble.com/quwstion-about-elrm-package-for-Exact-Logistic-Regrassion-tp24280344p24280344.html
Sent from the R help mailing list archive at Nabble.com.




More information about the R-help mailing list