Duplicate warning in TidyLPA

358 views
Skip to first unread message

Smale-Jacobse, A.E.

unread,
Jun 18, 2019, 9:17:45 AM6/18/19
to tidyLPA, Rosenberg, Joshua
Dear all,
One more rookie-question... In my analyses with the TidyLPA package I keep getting warnings about duplicate rows (that are not used in the analyses). It is not clear to me why duplicates are found; the row names (column names in Excel) obviously vary. 
I tried to get around this problem by using random numbering as rownames (by using the command ->  rownames (data) = rep (1:2066) ) but I still get this warning. Any suggestions?
Kind regards, Annemieke Smale


Joshua Rosenberg

unread,
Jul 19, 2019, 9:33:23 AM7/19/19
to tidyLPA
Hi Annemieke, thank you for this question. I wonder what function is returning this warning. Is there any way you could walk through line-by-line and tell us which function is associated with it? 
Thank you!
Josh

J.D. Haltigan

unread,
Jul 19, 2019, 3:32:01 PM7/19/19
to Joshua Rosenberg, tidyLPA
are sysmis (missing values) all specified correctly as N/A in data frame and are headers used in data frame?

Would check those potential trigger points as first step.

Best regards,
J.D.

--
You received this message because you are subscribed to the Google Groups "tidyLPA" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tidylpa+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tidylpa/5531b094-17aa-40f7-931d-7033751acefa%40googlegroups.com.

Hannah...@gmx.de

unread,
Apr 21, 2020, 9:57:21 AM4/21/20
to tidyLPA
Hi Annemieke,

Did you manage to fix the problem? I am encountering the same problem and I cannot find any information on how to deal with it anywhere.
If you did manage to fix it, do you have any tips for me?

Kind regards,
Hannah Peetz

Caspar van Lissa

unread,
Apr 21, 2020, 10:03:47 AM4/21/20
to tidyLPA
What code is producing the error?

Hannah...@gmx.de

unread,
Apr 21, 2020, 10:34:41 AM4/21/20
to tidyLPA
I was following the example from the Introduction to tidy LPA but none of the models worked.
I am basically just loading an excel file and then try to run the code with the relevant variables. It does not matter whether I omit all the missing values or not, I still get the same warnings.

Code:
data1 <- read.csv2('onlyr.csv')

data1%>%
  select(av_SeverityBullied, ZreceivedNom_Bullied)%>%
  single_imputation() %>%
  estimate_profiles(1:6)


Warning messages:
1: In data.row.names(row.names, rowsi, i) :
  some row.names duplicated: 4 --> row.names NOT used
2: In data.row.names(row.names, rowsi, i) :
  some row.names duplicated: 4,5,6,7,8 --> row.names NOT used
3: In data.row.names(row.names, rowsi, i) :
  some row.names duplicated: 4,5,6,7,8,9,10,11,12 --> row.names NOT used
4: In data.row.names(row.names, rowsi, i) :
  some row.names duplicated: 4,5,6,7,8,9,10,11,12,13,14,15,16 --> row.names NOT used
5: In data.row.names(row.names, rowsi, i) :
  some row.names duplicated: 4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20 --> row.names NOT used
6: In data.row.names(row.names, rowsi, i) :
  some row.names duplicated: 4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24 --> row.names NOT used
7: 
One or more analyses resulted in warnings! Examine these analyses carefully: model_1_class_4, model_1_class_5, model_1_class_6 

Caspar van Lissa

unread,
Apr 21, 2020, 11:46:00 AM4/21/20
to tidyLPA
This is not an error originating in tidyLPA. When I google your error, I find: https://stackoverflow.com/questions/50962364/error-in-row-names-data-frametmp-value-value-duplicate-row-names

Hannah...@gmx.de

unread,
Apr 22, 2020, 3:11:12 AM4/22/20
to tidyLPA
I already reduced my dataset to contain only three colums: participant number and my two variables. I still get the same error. And there are no hidden columns (I think) since I am using R studio and it clearly says I only have three columns. So I don't think that that is the problem. 

However, when trying again this morning I noticed a warning message when loading the tidyLPA package:

Warning message:
running command '"where" mplus.exe' had status 1 

Not sure if this has anything to do with it though.

Caspar van Lissa

unread,
Apr 22, 2020, 3:15:02 AM4/22/20
to tidyLPA
That warning message shouldn't have anything to do with it. It's not an error code, and it arises when we're checking if you have Mplus installed.

Can you run your code one line at a time to check which line gives the error?

Hannah...@gmx.de

unread,
Apr 28, 2020, 6:45:20 AM4/28/20
to tidyLPA
Yeah I also figured that the MPLus warning wasn't relevant.

How can I run the code one line at a time? Since I am using piping, R automatically runs the whole function.


Caspar van Lissa

unread,
Apr 28, 2020, 7:08:19 AM4/28/20
to tidyLPA
I don't think I can help with this; like I said, it's not an error in tidyLPA. Please see this manual for how to run one line at a time https://eeecon.uibk.ac.at/~discdown/rprogramming/first-steps-in-rstudio.html

Hanna...@gmx.de

unread,
Apr 29, 2020, 9:07:46 AM4/29/20
to tidyLPA
I managed to get rid of the warning by updating R to a newer version. Now that the code actually runs, I get new warning messages:

1: In mclustBootstrapLRT(full_data, modelName = mod_name,  ... :
  only 1-component model could be fitted. No LRT is performed!
2: In mclustBootstrapLRT(full_data, modelName = mod_name,  ... :
  only 1-component model could be fitted. No LRT is performed!
3: Mclust could not estimate model 2 with 2 classes.
4: Mclust could not estimate model 2 with 3 classes.
5: Mclust could not estimate model 2 with 4 classes.
6: Mclust could not estimate model 2 with 5 classes.
7: Mclust could not estimate model 2 with 6 classes.
8: Mclust could not estimate model 6 with 2 classes.
9: Mclust could not estimate model 6 with 3 classes.
10: Mclust could not estimate model 6 with 4 classes.
11: Mclust could not estimate model 6 with 5 classes.
12: Mclust could not estimate model 6 with 6 classes.
13: 
One or more analyses resulted in warnings! Examine these analyses carefully: model_1_class_4, model_1_class_5, model_1_class_6, model_2_class_2, model_2_class_3, model_2_class_4, model_2_class_5, model_2_class_6, model_3_class_4, model_3_class_5, model_3_class_6, model_6_class_2, model_6_class_3, model_6_class_4, model_6_class_5, model_6_class_6

It basically cannot run model 2 and 6, and with model 1 and 3 it has difficulties when I want to estimate 4 or more classes.
I do get results for model 1 and 3 with 1-3 classes. 

Caspar van Lissa

unread,
Apr 29, 2020, 9:22:34 AM4/29/20
to tidyLPA
Something unusual about your data, may be likert-scale, or too few observations. I'd really recommend involving a statistician to help run and interpret the analysis!
Reply all
Reply to author
Forward
0 new messages