I am trying to contrast the variables "race" and "vaccine". Both variables contained negative value labels in the dataset. I changed this with
Code:
egen race = group(w5_best_race), label
egen vaccine = group(w5_nc_cvhadvac), label
I can run regressions with the new variables, however when I try contrast
Code:
contrast race@vaccine, effects
contrast vaccine@race, effects
I get the following output:
variable race not found
r(111);
and
variable vaccine not found
r(111);
respectively
Despite being able to use the variables in regression and view them with -tab- and see them in my variables list. They definitely exist.
Related Posts with -contrast- function not finding variables that exist
ISOweek from dates in Stata: Code belowThere is no direct command for generating the ISOweek (ISO8601) from a date in Stata. The following …
calculating true confidence intervals across binomial distributionsI'm attempting to reproduce in Stata a technique from a statistical coding textbook ("Analysis of Ca…
Performing OLS after Lasso Model SelectionHi All, no specific code question here but rather a statistical one. I am trying to create a linear …
Identifying area of overlap from geoinpoly Hello everyone I'm working with two maps of the UK, with polygons of similar sizes. Specifically, …
How to change dot appearance in a marginsplot with recast(dot)?Hello all, Title is self explanatory. I'm presenting margins output in a marginsplot, and I'm choos…
Subscribe to:
Post Comments (Atom)
0 Response to -contrast- function not finding variables that exist
Post a Comment