Recently I am working with interaction in regression. And I learn a lot from [this](https://stats.oarc.ucla.edu/r/seminars/interactions-r/)

The package `emmeans` perform well in various kinds of regression.
However, I found it doesn't work with Complex Survey Design data.
So my question is

1. I would like to conduct multiple comparisons of a multilevel categorical variable in the model fitted by `svycoxph` like this I used to do

```
model<-coxph(Surv(futime,death)~factor(BMI_group),data=data) # BMI_group is a 3 level factor
cat<-emmeans(model,~ factor(BMI_group),type = "response")
contrast(cat,'revpairwise',adjust = 'tukey')

```

2. I would like to calculate the main/simple effect in the model with interaction. Below is the example in `coxph`

```
model<-coxph(Surv(futime,death)~factor(BMI_group)*factor(Sex),data=data) # BMI_group is a 3 level factor, Sex is a binary variable
catcat<-emmeans(model,~ factor(BMI_group)*factor(Sex),type = "response")
contrast(catcat,'revpairwise',adjust = 'tukey')

```

When using the Complex Survey Design data, the codes are as below

```
model<-svycoxph(Surv(futime,Death)~factor(BMI_group),design = Svydata)

```

AND

```
model<-svycoxph(Surv(futime,Death)~factor(BMI_group)*factor(Sex),design = Svydata)

```

Unfortunately package `emmeans` doesn't work

In a word, I would like to know if there is a substitute for `emmeans` to deal with Complex Survey Design data. Or if I can calculate what I want manually?

I hope my expression is clear enough and any insight is appreciated.