There was an error in 'add_p()/add_difference()' for variable 'Vascular', p-value omitted: Error in stats::chisq.test(x = c("No", "No", "No", "No", "No", "No", "No", : 'x'和'y'至少有两个层次

There is an error in using gtsummary package to do univariate -Logistic regression. I don't know how to solve it. Please help me. Thank you.


Welcome to the forum.

I think we need to see all of your code and some sample data. Copy the code and paste it here between
```

```

A handy way to supply some sample data is the dput() function. In the case of a large dataset something like dput(head(mydata, 100)) should supply the data we need. Just do dput(mydata) where mydata is your data. Copy the output and paste it here between
```

```

For some general information an asking questions see:
FAQ Asking Questions

Thank you but screenshots usually are close to useless. In particular, we cannot do anything with your data.

Please copy your code and paste it between
```

```

For data, use the dput() function. In the case of a large dataset something like dput(head(mydata, 100)) should supply the data we need. Just do dput(mydata) where mydata is your data. Copy the output and paste it here between
```

```

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.