-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to change reference level for covariates in latent class analysis? #14
Comments
I decided to calculate them manually applying the formula to transform odds ratios to probabilities in multinomial logistic regressions (in this example I had 5 classes and two terms: "(Intercept)" and "outcome1"): `# Use map_df to loop through each call class and apply the summarise logic require(glca) df_best_model_glca_w_distal_outcome2<- List of call classescall_classes <- unique(df_best_model_glca_w_distal_outcome2$prefix) result2 <- map_df(call_classes, ~ { result2_lo <- map_df(call_classes, ~ { result2_hi <- map_df(call_classes, ~ { result2b <- map_df(call_classes, ~ { result2b_lo <- map_df(call_classes, ~ { result2b_hi <- map_df(call_classes, ~ { df_lca40522_probs<- df_lca40522_probs %>% |
I'm using the glca package to estimate a latent class model with covariates. In the table of covariate coefficients, the reference value for the regiao variable is set to CENTRO-OESTE, but I would like to set it to SUDESTE.
However, I can't seem to find any argument in the
glca
function to set the reference levels for each covariate. I checked the package documentation but there's no mention of how to do this.Here is an example of the coefficient table:
The text was updated successfully, but these errors were encountered: