mplus2lavaan not working

124 views
Skip to first unread message

Georgi Yankov

unread,
Jul 9, 2020, 10:34:30 AM7/9/20
to lavaan
I am trying to convert MPlus syntax to lavaan syntax with the mplus2lavaan function but I get the error below. My MPlus data and .inp files are in the same directory as the R syntax file. I also tried with other .inp like http://statmodel.com/userguide/chap5/ex5.1.inp

> bestmodel <- mplus2lavaan("BestEstimation.inp", run = F)

Error in mplus2lavaan.modelSyntax(sections$model) :

  mplus2lavaan.modelSyntax syntax argument should be a single string, not a vector


Any help is much appreciated!

Carlos A. Almenara

unread,
Jul 9, 2020, 11:04:50 AM7/9/20
to lav...@googlegroups.com
Dear Georgi,

I have the same question.
In my case, I used the attached MPlus code and I got this error

Error in sub("^([^@]+)(@[\\d-.]+)?$", "\\2", v_post, perl = TRUE) :
  invalid regular expression '^([^@]+)(@[\d-.]+)?$'
In addition: Warning message:
In sub("^([^@]+)(@[\\d-.]+)?$", "\\2", v_post, perl = TRUE) :
  PCRE pattern compilation error
        'invalid range in character class'
        at '-.]+)?$'

Any help would be really appreciated!

C.


--
You received this message because you are subscribed to the Google Groups "lavaan" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lavaan+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lavaan/8fdd64c6-783e-48c8-b0f4-329092314298o%40googlegroups.com.
rogoza2020.inp

Yves Rosseel

unread,
Jul 16, 2020, 2:12:35 PM7/16/20
to lav...@googlegroups.com
Confirmed. I will alert the maintainer of the mplus2lavaan() function.

Yves.

On 7/9/20 5:04 PM, Carlos A. Almenara wrote:
> Dear Georgi,
>
> I have the same question.
> In my case, I used the attached MPlus code and I got this error
>
> Error in sub("^([^@]+)(@[\\d-.]+)?$", "\\2", v_post, perl = TRUE) :
>   invalid regular expression '^([^@]+)(@[\d-.]+)?$'
> In addition: Warning message:
> In sub("^([^@]+)(@[\\d-.]+)?$", "\\2", v_post, perl = TRUE) :
>   PCRE pattern compilation error
>         'invalid range in character class'
>         at '-.]+)?$'
>
> Any help would be really appreciated!
>
> C.
>
>
> On Thu, Jul 9, 2020, 09:34 Georgi Yankov <georgi....@gmail.com
> <mailto:georgi....@gmail.com>> wrote:
>
> I am trying to convert MPlus syntax to lavaan syntax with the
> mplus2lavaan function but I get the error below. My MPlus data and
> .inp files are in the same directory as the R syntax file. I also
> tried with other .inp like
> http://statmodel.com/userguide/chap5/ex5.1.inp
>
> > bestmodel <- mplus2lavaan("BestEstimation.inp", run = F)____
>
> Error in mplus2lavaan.modelSyntax(sections$model) : ____
>
>   mplus2lavaan.modelSyntax syntax argument should be a single
> string, not a vector____
>
>
> Any help is much appreciated!
>
> --
> You received this message because you are subscribed to the Google
> Groups "lavaan" group.
> To unsubscribe from this group and stop receiving emails from it,
> send an email to lavaan+un...@googlegroups.com
> <mailto:lavaan+un...@googlegroups.com>.
> <https://groups.google.com/d/msgid/lavaan/8fdd64c6-783e-48c8-b0f4-329092314298o%40googlegroups.com?utm_medium=email&utm_source=footer>.
>
> --
> You received this message because you are subscribed to the Google
> Groups "lavaan" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to lavaan+un...@googlegroups.com
> <mailto:lavaan+un...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/lavaan/CAJzaLGQ%2BudHSZnO1wF6UGpGewhoeJ9Um%2B9ST5KmPyc9pOrdOXw%40mail.gmail.com
> <https://groups.google.com/d/msgid/lavaan/CAJzaLGQ%2BudHSZnO1wF6UGpGewhoeJ9Um%2B9ST5KmPyc9pOrdOXw%40mail.gmail.com?utm_medium=email&utm_source=footer>.
Reply all
Reply to author
Forward
0 new messages