ElMaestro ★★★ Denmark, 2017-08-29 12:20 (2762 d 08:34 ago) Posting: # 17747 Views: 9,724 |
|
Hi all, let us say we have an lm object for a BE analysis in a study where we have n treatments.Is there a way to use confint() to derive CI's for the difference of the i'th and j'th treatments (where obviously i!=j, and i is within 1..n and j is within 1..n) ?If not, is there another built-in function that achieves this goal? Google isn't my friend. ![]() ![]() Many thanks. — Pass or fail! ElMaestro |
d_labes ★★★ Berlin, Germany, 2017-08-29 14:23 (2762 d 06:32 ago) @ ElMaestro Posting: # 17749 Views: 8,698 |
|
Dear Öberster Größter Meister, ❝ let us say we have an ❝ Is there a way to use confint() gives you confidence intervals for the model parameters only.❝ If not, is there another built-in function that achieves this goal? Have a look at package multcomp. Or if you prefer using such beasts like "least square means" have a look at package lsmeans. BTW: All-at-once is not the preferred method of a big regulatory body. Pairwise lm objects (throwing away the data under those treatments not under consideration) will give you the opportunity to use confint() to derive CI's.— Regards, Detlew |
ElMaestro ★★★ Denmark, 2017-08-29 16:45 (2762 d 04:09 ago) @ d_labes Posting: # 17751 Views: 8,776 |
|
Hi d_labes, thanks for your input. ❝ No. Except when we fit the model with intercept, treatment first. Now the SE for whichever treatment is not the intercept, is the SE of the difference (and the other treatment effect is unestimable because of the intercept). The funny logic of linear models. I need to get my head around that aspect. ❝ Or if you prefer using such beasts like "least square means" have a look at package lsmeans. When we look at treatment effect differences it does not matter how we define the effects by contrast coding. I don't absolutely need an LSMean; I can do with two model effects calcuated in any valid way as long as I can extract their difference. ❝ BTW: All-at-once is not the preferred method of a big regulatory body. Yes, I have heard of that big regulatory body. But there is a problem. All-at-once is the preferred method of another big regulatory body. ![]() ![]() ![]() ![]() ❝ Pairwise lm objects (throwing away the data under those treatments not under consideration) will give you the opportunity to use ![]() Many thanks. — Pass or fail! ElMaestro |
ElMaestro ★★★ Denmark, 2017-08-30 01:18 (2761 d 19:37 ago) @ ElMaestro Posting: # 17753 Views: 8,595 |
|
Hi all, since no standard function exists which helps me along, I wrote the stuff below. The structure of the input file is like in the appendices for Schütz, Labes, Fuglsang's paper in the AAPS Journal. I am sure the code police will tell me this isn't efficient ![]() apply family calls. I am sure that is correct. Does the code achieve its goal properly, though? That is a much more interesting question. Not at all throughly tested and certainly not validated.The purpose is to allow some CI info where we don't ask for "T/R" but perhaps for "R/T" or for "B/D" or "Foo/Bar", whatever.
— Pass or fail! ElMaestro |
mittyri ★★ Russia, 2017-08-30 10:11 (2761 d 10:43 ago) @ ElMaestro Posting: # 17754 Views: 8,536 |
|
Hi ElMaestro, ❝ When we look at treatment effect differences it does not matter how we define the effects by contrast coding. I don't absolutely need an LSMean; I can do with two model effects calcuated in any valid way as long as I can extract their difference. ![]() library("lsmeans") I like this package, there is even support for nested structures in latest version. — Kind regards, Mittyri |
ElMaestro ★★★ Denmark, 2017-08-30 11:27 (2761 d 09:28 ago) @ mittyri Posting: # 17755 Views: 8,591 |
|
Hi Mittyri, ❝ ❝ confint(pairs(lsmeans(M, "Trt"), reverse =TRUE), level=1-alpha*2) Thanks a lot. This really reminds me of someone who once told me that when I get a good idea then I can be quite certain that somewhere someone else had that same idea already. Have a good day. — Pass or fail! ElMaestro |
d_labes ★★★ Berlin, Germany, 2017-08-30 21:55 (2760 d 23:00 ago) @ ElMaestro Posting: # 17758 Views: 8,482 |
|
Dear ElMaestro, ❝ ... Yes, I have heard of that big regulatory body. But there is a problem. All-at-once is the preferred method of another big regulatory body. If you speak here FDAish have a look at this post. Unfortunately the reference is no longer found on the Inder-net. — Regards, Detlew |