Bioequivalence and Bioavailability Forum 19:40 CET

Main page Policy/Terms of Use Abbreviations Latest Posts

 Log in |  Register |  Search

confint and adjust in R [General Sta­tis­tics]

posted by ElMaestro - Denmark, 2019-01-07 18:12  - Posting: # 19754
Views: 246

Dear d_labes,

» What you describe must be an effect of using an add-on package with comes with the possibility to consider multiplicity in calculation of confidence intervals.

Thanks a lot for commenting :-)

Can you try this:

library("lsmeans")
set.seed(12341)
v1=c(rep("A",10),rep( "B",10), rep( "C", 10))
v2=c(rep("Q",10),rep( "W",10), rep( "E",10))
Foo=sample(v1)
Bar=sample(v2)
y=runif(30)
M=lm(y~factor(Foo)+factor(Bar))

confint(pairs(lsmeans(M, "Foo")), adjust="none")
confint(pairs(lsmeans(M, "Foo")), adjust="bonferroni")
confint(pairs(lsmeans(M, "Foo")), adjust="eat.my.shorts")
confint(pairs(lsmeans(M, "Foo")))
# HAPPY NEW YEAR


It gives four different results here. You can see adjust is passed as an argument to the confint function so can't see how it would be part of lsmeans or pairs args.

if (3) 4

x=c("Foo", "Bar")
b=data.frame(x)
typeof(b[,1]) ##aha, integer?
b[,1]+1 ##then let me add 1



Best regards,
ElMaestro

"(...) targeted cancer therapies will benefit fewer than 2 percent of the cancer patients they’re aimed at. That reality is often lost on consumers, who are being fed a steady diet of winning anecdotes about miracle cures." New York Times (ed.), June 9, 2018.

Complete thread:

Activity
 Mix view
Bioequivalence and Bioavailability Forum |  Admin contact
19,022 posts in 4,057 threads, 1,297 registered users;
online 13 (0 registered, 13 guests [including 9 identified bots]).

Like dreams, statistics are a form
of wish fulfillment.    Jean Baudrillard

The BIOEQUIVALENCE / BIOAVAILABILITY FORUM is hosted by
BEBAC Ing. Helmut Schütz
HTML5 RSS Feed