lsmeans() & lme() [🇷 for BE/BA]

posted by Helmut Homepage – Vienna, Austria, 2015-04-20 03:28 (4075 d 18:49 ago) – Posting: # 14711
Views: 32,305

Hi Yung-jin,

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]
Helmut Schütz
[image]

The quality of responses received is directly proportional to the quality of the question asked. 🚮
Science Quotes
Thread locked

Complete thread:

UA Flag
Activity
 Admin contact
23,654 posts in 4,992 threads, 1,571 registered users;
146 visitors (0 registered, 146 guests [including 19 identified bots]).
Forum time: 22:18 CEST (Europe/Vienna)

Always listen to experts.
They’ll tell you what can’t be done and why.
Then do it.    Robert A. Heinlein

The Bioequivalence and Bioavailability Forum is hosted by
BEBAC Ing. Helmut Schütz
HTML5