estimate 'average' intercept 3 Sequence 1 1 1/devisor=3; How to get the estimate of average in R

34 Views Asked by At

I am trying to calculate the reference scaled average method for partial replicate design in R, but not able to estimate the average of "Sequence" effect.

Equivalent SAS code is posted below, and we can also get in FDA guideline for Progesterone.

SAS code piece

I am trying to calculate the reference scaled average method for partial replicate design in R, but not able to estimate the average of "Sequence" effect.

1

There are 1 best solutions below

2
PBulls On BEST ANSWER

I don't know of a way to do this in base R, but the emmeans package provides functions to do exactly this. Reproducing the equivalent SAS code:

fit <- lm(ilat ~ factor(seq), data=scavbe)
emm <- emmeans::emmeans(fit, ~ seq)
emmeans::contrast(emm, list(average = rep(1/3, 3)))