lsmeans() & lme() [🇷 for BE/BA]
Hi Yung-jin,
funny – while you posted I experimented with
That’s not correct – see
Hint: If in a replicate design evaluated by a mixed effects model the SEs of R and T are equal, likely something is wrong with the coding.
I hijacked your
Bingo for the means! The SEs are still off (compared to PHX).
At least something to start from.
Post #500 this year.
funny – while you posted I experimented with
lsmeans
as well. Not so bad. 
❝ lsmeans only work with lmer(), not lme().
That’s not correct – see
help(models)
!Hint: If in a replicate design evaluated by a mixed effects model the SEs of R and T are equal, likely something is wrong with the coding.
I hijacked your
RepMIX()
and renamed to honor ElMaestro.# Change to directory containing "SingleRep_stat_demo.csv" first!
# setwd("E:/Public/Documents/BEBAC/bear/")
library(nlme)
library(lsmeans)
cnames <- c("subj", "drug", "seq", "prd", "Cmax",
"AUC0t","AUC0INF","lnCmax","lnAUC0t","lnAUC0INF")
TotalData <- read.csv("SingleRep_stat_demo.csv",
header=T, row.names=NULL, col.names=cnames, sep=",", dec=".")
TotalData[, !(names(TotalData) %in% c("AUC0t", "AUC0INF", "lnCmax",
"lnAUC0t","lnAUC0INF"))]
muddle <- lme(log(Cmax) ~ drug+seq+prd, random = ~drug-1|subj,
data=TotalData)
lsmeans(muddle, "drug", cov.reduce=F, weights="equal")
drug lsmean SE df lower.CL upper.CL
1 7.328141 0.02504047 12 7.273582 7.382699
2 7.391880 0.03485385 12 7.315940 7.467820
Results are averaged over the levels of: seq, prd
Confidence level used: 0.95
Bingo for the means! The SEs are still off (compared to PHX).
Level Estimate StdError DF
R 7.328141 0.039852 12
T 7.391880 0.032656 12
At least something to start from.
Post #500 this year.
—
Dif-tor heh smusma 🖖🏼 Довге життя Україна!![[image]](https://static.bebac.at/pics/Blue_and_yellow_ribbon_UA.png)
Helmut Schütz
![[image]](https://static.bebac.at/img/CC by.png)
The quality of responses received is directly proportional to the quality of the question asked. 🚮
Science Quotes
Dif-tor heh smusma 🖖🏼 Довге життя Україна!
![[image]](https://static.bebac.at/pics/Blue_and_yellow_ribbon_UA.png)
Helmut Schütz
![[image]](https://static.bebac.at/img/CC by.png)
The quality of responses received is directly proportional to the quality of the question asked. 🚮
Science Quotes

Complete thread:
- Reproducing Bear results in Phoenix mittyri 2015-04-14 08:35 [🇷 for BE/BA]
- Bug in bear? Helmut 2015-04-14 14:07
- Bug in bear? mittyri 2015-04-14 20:43
- Bug in bear? Helmut 2015-04-15 02:17
- use the same dataset? yjlee168 2015-04-20 10:13
- Bug in bear? mittyri 2015-04-14 20:43
- Bugs in bear with replicated demo data set? yjlee168 2015-04-15 09:38
- Bugs fixed in bear? yjlee168 2015-04-17 01:21
- Bugs fixed in bear? Helmut 2015-04-17 14:25
- Bugs fixed in bear? yjlee168 2015-04-17 18:50
- Bugs fixed in bear? ElMaestro 2015-04-17 23:14
- lme() in bear yjlee168 2015-04-18 11:12
- lme() in bear ElMaestro 2015-04-18 11:28
- lme() in bear yjlee168 2015-04-18 12:02
- lme() in bear ElMaestro 2015-04-18 13:42
- Mean means Helmut 2015-04-18 14:08
- Mean means ElMaestro 2015-04-18 16:01
- Mean means Helmut 2015-04-19 00:59
- Mean means ElMaestro 2015-04-19 09:14
- LL and AIC Helmut 2015-04-19 11:08
- Confused ElMaestro 2015-04-19 11:42
- LL and AIC Helmut 2015-04-19 11:08
- lsmeans for mixed model in R yjlee168 2015-04-19 23:36
- lsmeans() & lme()Helmut 2015-04-20 01:28
- lsmeans() & lme() yjlee168 2015-04-20 10:23
- lsmeans() & lme() ElMaestro 2015-04-20 10:35
- keep it simple! Helmut 2015-04-20 14:34
- keep it simple! ElMaestro 2015-04-20 15:39
- ML vs. REML Helmut 2015-04-20 16:35
- keep it simple! ElMaestro 2015-04-20 15:39
- keep it simple! Helmut 2015-04-20 14:34
- lsmeans() & lme()Helmut 2015-04-20 01:28
- Mean means ElMaestro 2015-04-19 09:14
- Mean means Helmut 2015-04-19 00:59
- Mean means ElMaestro 2015-04-18 16:01
- Mean means Helmut 2015-04-18 14:08
- lme() in bear ElMaestro 2015-04-18 13:42
- lme() in bear yjlee168 2015-04-18 12:02
- lme() with NA in R yjlee168 2015-04-19 23:44
- lme() in bear ElMaestro 2015-04-18 11:28
- lme() in bear yjlee168 2015-04-18 11:12
- Dataset Helmut 2015-04-18 13:30
- Dataset and lme() in bear yjlee168 2015-04-18 23:14
- Bugs fixed in bear? ElMaestro 2015-04-17 23:14
- Bugs fixed in bear? yjlee168 2015-04-17 18:50
- Bugs fixed in bear? Helmut 2015-04-17 14:25
- Bug in bear? Helmut 2015-04-14 14:07