Ana, I cannot help you with how to include weights in your analysis. However, you can use formals(poLCA) or ?poLCA to see that weights is not one of the acceptable arguments. R ignores arguments not used by the called function because functions within the called function may use them.
You can probably have (weights = "no weights here") in your function call and get the same result. Mark R. Mark Sharp msh...@txbiomed.org<mailto:msh...@txbiomed.org> On Apr 3, 2013, at 3:48 AM, Ana Lucía Cárdenas Martínez wrote: Hello, I want to perform a latent class analysis using poLCA package. My formula is: substances <- cbind(subs1, subs2, subs3, subs4, subs5, subs6) ~ gender+age+education+income+occupation+urban+dbehavior+incarceration+treatment+depression+alcriteria I want to include sample weights in the model, I have read that poLCA does not take into account weights, but when I introduce them, it seems that the model is running correctly. This is the command I am using: lca2 <- poLCA(substances, ena, nclass=2, graphs=TRUE, maxiter=2000, (weights=p_adicc)) my question is, if the results are really taking into account the weights ? if not, how can I introduce weights into my analysis? Thank you for your help. Regards, Ana ______________________________________________ R-help@r-project.org<mailto:R-help@r-project.org> mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. [[alternative HTML version deleted]]
______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.