How to delete a particular observatio... PreviousNext
Mplus Discussion > Missing Data Modeling >
 Phil Wood posted on Wednesday, August 03, 2011 - 8:37 am
This is a simple syntax question. I have a data set with five variables, continuously measured. Based on leverage statistics, I want to delete a particular observation, say #335. Writing a useobservations statement is cumbersome, given that the variables are all continuously measured. Is there any way to easily delete a given observation in the file without listing it's particular values? This would make it easier to use the influence plots and rerun the analysis without influential observations. If it's not current syntax, it might be a useful thing to add. Just a thought. thanks!
 Linda K. Muthen posted on Wednesday, August 03, 2011 - 10:19 am
If you have an id variable, you can delete using the number the person has on the id variable.
 Phil Wood posted on Wednesday, August 03, 2011 - 11:32 am
That's true, but in this case, it's just the variables. I think the best answer at this point is to savedata the influence diagnostics and then useobservations based on that, including just usevariables for only the analysis variables. it's a little cumbersome for large datasets. That's why I suggested that maybe one could consider a reserved variable for observation number (analogous to the _N_ variable in SAS) which would index the observation number. Thanks.
 Linda K. Muthen posted on Wednesday, August 03, 2011 - 11:49 am
It might be worthwhile to add an id variable to your data set. Then if you identify it using the IDVARIABLE option, you will see the ID number when you hold the cursor on the outlier in the plot and you can easily exclude the observations.
Back to top
Add Your Message Here
Username: Posting Information:
This is a private posting area. Only registered users and moderators may post messages here.
Options: Enable HTML code in message
Automatically activate URLs in message