kaigu1990 / stabiot

Common Statistical Analysis for Clinical Trials in Biotech
GNU General Public License v3.0
2 stars 0 forks source link

Fix unexpected missing while print the outputs of ls-means #33

Closed kaigu1990 closed 4 months ago

kaigu1990 commented 4 months ago

If the grouping variable is numeric, emmeans package will automatically concentrate the number with variable name. Thus it will lead to a lack of output for contrast testing in the LS-means calculation.

One solution is to change the contrast column by removing the name of the grouping variable from it. For example, remove the 'trt' from 'trt2 - trt1' so that it can be consistent with other dataframes.

Don't forget to add a test for this issue, using the low1.sas7bdat data.