Re: [R] clm funtion and CI

2015-07-10 Thread Luciane Maria Pilotto
(0L, 0L, 0L, 0L, 0L, 
    0L, 0L, 0L, 0L, 0L), perdidos = c(0, 0, 0, 1, 0, 4, 0, 0, 
    1, 0), usaprots = c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0), usaproti = 
structure(c(1L, 
    1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L), .Label = c(Não Usa, 
    Uma Ponte Fixa, Mais de 1 PF, Prótese Parcial Removível,
    Prótese Fixa + Removível, Prótese Total, Sem Informação
    ), class = factor), necprots = structure(c(1L, 1L, 3L, 
    1L, 1L, 1L, 1L, 1L, 1L, 1L), .Label = c(Não necessita, 
    Prótese 1 elemento, Mais de 1 elemento, Combinação de próteses, 
    Prótese Total, Sem Informação), class = factor), necproti = 
structure(c(1L, 
    1L, 4L, 2L, 1L, 3L, 1L, 1L, 2L, 1L), .Label = c(Não necessita, 
    Prótese 1 elemento, Mais de 1 elemento, Combinação de próteses, 
    Prótese Total, Sem Informação), class = factor), necprot = 
structure(c(1L, 
    1L, 3L, 2L, 1L, 2L, 1L, 1L, 2L, 1L), .Label = c(Não necessita, 
    Parcial 1 maxilar, Parcial 2 maxilar, Total 1 maxilar, 
    Parcial + Total, Total 2 maxilar, Sem Informação), class = factor), 
    oidp = c(0L, 0L, 0L, 0L, 0L, 2L, 1L, 0L, 0L, 1L), f1 = c(1, 
    1, 1, 1, 1, 1, 1, 1, 1, 1), f2 = c(0.051897009506, 0.051897009506, 
    0.051897009506, 0.051897009506, 0.051897009506, 
    0.051897009506, 0.051897009506, 0.051897009506, 
    0.106059998273849, 0.106059998273849), f3 = c(0.066220653992,
    0.066220653992, 0.066220653992, 0.066220653992, 
    0.066220653992, 0.066220653992, 0.066220653992, 
    0.066220653992, 0.138889998197556, 0.138889998197556), 
    f = c(0.0034388399446, 0.0034388399446, 0.0034388399446, 
    0.0034388399446, 0.0034388399446, 0.0034388399446, 
    0.0034388399446, 0.0034388399446, 0.014729371171, 
    0.014729371171), bwgr_et = c(291.019989013672, 291.019989013672, 
    291.019989013672, 291.019989013672, 291.019989013672, 291.019989013672, 
    291.019989013672, 291.019989013672, 67.879997253418, 67.879997253418
    ), cluster = c(12004010556, 12004010556, 12004010556,
    12004010556, 12004010556, 12004010556, 12004010556,
    12004010556, 12004010562, 12004010562), cluster2 = 
c(01120308, 
    01120308, 01120308, 01120308, 01120308, 01120308, 
    01120308, 01120308, 01120309, 01120309), getni = c(1L, 
    4L, 4L, 4L, 2L, 4L, 4L, 4L, 4L, 4L), q04 = c(2L, 3L, 3L, 
    4L, NA, 2L, 1L, NA, 3L, 3L), q06 = c(2L, 2L, 2L, 2L, 2L, 
    2L, 2L, 2L, 2L, 2L), q07 = c(1L, 1L, 1L, 1L, 1L, 1L, 1L, 
    1L, 2L, 1L), q08 = c(0, 0, 0, 0, 0, 0, 0, 0, 3, 0), q10 = c(NA,
    NA, 2L, 3L, 3L, 2L, 2L, 3L, 3L, 3L), q11 = c(NA, NA, 1L, 
    1L, 2L, 1L, 1L, 1L, 1L, 1L), q12 = c(NA, NA, 2L, 4L, 1L, 
    3L, 1L, 4L, 2L, 1L), q13 = structure(c(NA, NA, 2L, 3L, 2L, 
    3L, 2L, 2L, 2L, 2L), .Label = c(1, 2, 3, 4, 5), class = 
factor), 
    q14 = c(3L, 2L, 3L, 4L, 2L, 2L, 4L, 3L, 4L, 2L), q15 = c(1L, 
    1L, 2L, 1L, 1L, 1L, 1L, 1L, 1L, 1L), edcat = c(3, 1, 4, 2, 
    3, 3, 2, 4, 2, 2), peso = c(291, 291, 291, 291, 291, 291, 
    291, 291, 68, 68), cariado = c(3L, 0L, 6L, 2L, 0L, 2L, 1L, 
    4L, 5L, 3L), getar = c(1, 1, 1, 1, 1, 1, 1, 1, 1, 1)), .Names = c(regiao, 
estado, cod_mun, setor, cap_int, idade, getario, 
sexo, grp_etni, quest_01, quest_02, density, quest_03, 
quest_04, inc_percapita1, inc_percapita2, inc_sqrt1, 
inc_sqrt2, q05, quest_06, quest_07, quest_08, quest_09, 
quest_10, quest_11, quest_12, quest_13, quest_14, quest_15, 
exame, cpod, p_sang, p_calc, cpi_max, dai, trauma, 
n_higido, n_cariado, n_restcar, n_restaur, n_perdcar, 
n_perdout, perdidos, usaprots, usaproti, necprots, 
necproti, necprot, oidp, f1, f2, f3, f, bwgr_et, 
cluster, cluster2, getni, q04, q06, q07, q08, q10, 
q11, q12, q13, q14, q15, edcat, peso, cariado, 
getar), row.names = c(1241, 1242, 1243, 1244, 1245, 
1246, 1247, 1248, 1256, 1268), class = data.frame)


id3$q13-as.factor(id3$q13)
m1 - polr(q13 ~ q11 + q10 + q12 + edcat + q08 + q06 + q14, data=id3, 
Hess=TRUE) 
summary(m1)
ordinal.or.display(m1)


fm1 - clm(q13 ~ q11 + q10 + q12 + edcat + q08 + q06 + q14, data=id3) 

summary(fm1)
exp(coef(fm1)) 

[[elided Yahoo spam]]
(ci - confint(fm1))
exp(cbind(OR = coef(fm1), ci))


nominal_test(fm1)# test partial proportional odds assumption

##clm2 - partial proprotional odds

fm.nom - clm2(q13 ~ q11 + q10 + q12 + q08 + q06 + q14, data=id3, nominal=~ 
edcat)
summary(fm.nom)
exp(coef(fm.nom))
[[elided Yahoo spam]]
exp(cbind(OR = coef(fm.nom), ci))

Thanks,
Luciane

Em qui, 9/7/15, Kevin Wright kw.s...@gmail.com escreveu:

 Assunto: Re: [R] clm funtion and CI

 Data: Quinta-feira, 9 de Julho de 2015, 11:44

 You need a reproducible
 example.

 On Wed, Jul 8

[R] clm funtion and CI

2015-07-08 Thread Luciane Maria Pilotto
Hi,

I'm working with ordinal logistic regression and fitting the model with the 
clm funtion of the ordinal package and would like to get the CI. According to 
the Tutorial on fitting Cumulative Link Models with the ordinal Package, Rune 
Haubo B Christensen (21 January 2015) you can run the OR, but not CI. The same 
happens with the clm2 for partial proportional odds.

I appreciate any help !!


Luciane

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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.