Hi,
Hi,I'm having some problems running faoutlier. Specifically using the following syntax:
model1 <- '
# measurement model
DS =~ PBEQ4 + PBEQ6R + PBEQ10 + PBEQ13 + PBEQ2 + PBEQ8
NA =~ PBEQ5 + PBEQ7 + PBEQ1 + PBEQ9
ES =~ PBEQ12R + PBEQ3'(FS <- forward.search(edie, model1))
(FS.outlier <- forward.search(edie.outlier, model1))
plot(FS)
plot(FS.outlier)I get the error message "Error in na.omit(data) : object 'edie.outlier' not found"
I also had two other queries 1) do I need to inform faoutlier that the data are ordinal (normally I do this in lavaan in the fitting function, e.g., fit1 <- sem(model1, data = edie, ordered=c ...,
2) could you recommend where I could read an overview of the forward search approach to outlier detection as it is new to me.
Help with these points is veyr much appreciated. ThanksPeter
--
You received this message because you are subscribed to a topic in the Google Groups "lavaan" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/lavaan/vNFWp9Ir01c/unsubscribe.
To unsubscribe from this group and all its topics, send an email to lavaan+un...@googlegroups.com.
To post to this group, send email to lav...@googlegroups.com.
Visit this group at http://groups.google.com/group/lavaan.
For more options, visit https://groups.google.com/d/optout.
As I'm new to R I just wanted to check I had the syntax down
correctly. Currently I'm using the following:
edie[,c("PBEQ1", "PBEQ2", "PBEQ3",
"PBEQ4", "PBEQ5", "PBEQ6R", "PBEQ7",
"PBEQ8", "PBEQ9", "PBEQ10", "PBEQ11",
"PBEQ12R", "PBEQ13")] <-
lapply(edie[,c("PBEQ1", "PBEQ2", "PBEQ3",
"PBEQ4", "PBEQ5", "PBEQ6R", "PBEQ7",
"PBEQ8", "PBEQ9", "PBEQ10", "PBEQ11",
"PBEQ12R", "PBEQ13")], ordered)
library(lavaan)
model5 <- '
# measurement model
DS =~ PBEQ4 + PBEQ6R + PBEQ10 + PBEQ13 + PBEQ2 + PBEQ8
NA =~ PBEQ5 + PBEQ7 + PBEQ1 + PBEQ9
ES =~ PBEQ12R + PBEQ3'
(gCDresult <- gCD(edie, model5))
plot(gCDresult)
This seems to provide different results depending on whether I set the items to be categorical, so I assume faoutlier is taking this into account.
Incidentally, robustMD does not work as it states some IQR = 0, I assume this relates to the ordinal nature of the data (4 ordered categories), so that an IQR of 0 might be expected. For obs.resid, I get the error message “Error: is.numeric(x) || is.logical(x) is not TRUE”, any thoughts. Everything else seems to work fine.
Peter
As I'm new to R I just wanted to check I had the syntax down correctly. Currently I'm using the following:
edie[,c("PBEQ1", "PBEQ2", "PBEQ3", "PBEQ4", "PBEQ5", "PBEQ6R", "PBEQ7", "PBEQ8", "PBEQ9", "PBEQ10", "PBEQ11", "PBEQ12R", "PBEQ13")] <-
lapply(edie[,c("PBEQ1", "PBEQ2", "PBEQ3", "PBEQ4", "PBEQ5", "PBEQ6R", "PBEQ7", "PBEQ8", "PBEQ9", "PBEQ10", "PBEQ11", "PBEQ12R", "PBEQ13")], ordered)
library(lavaan)
model5 <- '(gCDresult <- gCD(edie, model5))
# measurement model
DS =~ PBEQ4 + PBEQ6R + PBEQ10 + PBEQ13 + PBEQ2 + PBEQ8
NA =~ PBEQ5 + PBEQ7 + PBEQ1 + PBEQ9
ES =~ PBEQ12R + PBEQ3'
plot(gCDresult)
This seems to provide different results depending on whether I set the items to be categorical, so I assume faoutlier is taking this into account.
Incidentally, robustMD does not work as it states some IQR = 0, I assume this relates to the ordinal nature of the data (4 ordered categories), so that an IQR of 0 might be expected.
For obs.resid, I get the error message “Error: is.numeric(x) || is.logical(x) is not TRUE”, any thoughts. Everything else seems to work fine.
let me know if you need any more info, thanks
let me know if you need any more info, thanksPeter
--