report.lsmeans

0th

Percentile

Returns in a pretty format, the LS means of a model (It's not that fantastic but it's handy)

Create nice reporting table of lsmeans (or emmeans if you prefer, whatever...).

Usage
report.lsmeans(lsm, x1.name = "treatment", x2.name = NULL,
  x3.name = NULL, variable.name = "Statistics", at.row = NULL,
  infer = c(T, T), type = "link")
Arguments
lsm

an emmGrid object (result of a emmeans call)

x1.name

Character indicating a factor in the data. Levels will be displayed in columns

x2.name

Character indicating a factor in the data. Levels will be displayed in rows

x3.name

Character indicating a factor in the data. Levels will be displayed in rows

variable.name

Character. The label of the column which indicates the statistics reported.

at.row

Character. Passed to spacetable function. Used to space the results per levels of the mentioned variable

infer

pass to summary.emmGrid function. Can be c(T,T) c(T,F) c(F,T) c(F,F) or T or F

type

Character. pass to summary.emmGrid function. can be "link" or "response"

Details

This function has been created with love and passion.

Value

A desc object that can be used for the report.doc function.

See Also

report.quali emmeans report.doc

Aliases
  • report.lsmeans
Examples
# NOT RUN {
library(emmeans)
library(lme4)

data(data)

#Simple lm model

luke=lm(Petal.Width~Species,data=iris)
vador=emmeans(luke,~Species)
report.lsmeans(vador,"Species")

# In case of just one intercept, x1.name="X1"
lucky=glm(Species~1,data=iris,family=binomial)
strike=emmeans(lucky,~1)
report.lsmeans(strike,"X1")

#Mixed model example using lme4

james=lmer(y_numeric~GROUP+TIMEPOINT+GROUP*TIMEPOINT+(1|SUBJID),data=data) 
bond=emmeans(james,~GROUP|TIMEPOINT)
report.lsmeans(lsm=bond,x1.name="GROUP",x2.name="TIMEPOINT",at.row="TIMEPOINT")


# }
Documentation reproduced from package ClinReport, version 0.9.1.1, License: GPL (>= 2)

Community examples

Looks like there are no examples yet.