Deparse issue with semPath

115 views
Skip to first unread message

April Smith

unread,
Nov 17, 2018, 12:49:22 PM11/17/18
to lavaan
Hi,

I wrote code to do an SEM using lavaan 6months+ ago.  The code worked beautifully then; I am having issues with it today.  Specifically, I get this error code when running semPaths in semPlot.  Any thoughts on what's wrong today?  I have multiple sem's and plots, and I get this error with all of them.

Error:
Error in deparse(substitute(object)) : 
  no slot of name "version" for this object of class "lavaan"
Error during wrapup: no slot of name "version" for this object of class "lavaan"

Code:

Hypo.lbls<-c("Shrub\nCover\n2015","Shrub\nCover\n2004", "Introduced\nCover\n2015","Introduced\nCover\n2004",
             "Time\nBetween\nFires 2015","Time\nBetween\nFires 2004","Number of\n Reburns\n2015","Number of\n Reburns\n2004",
              "dNBR\n2008","dNBR\n2003", "MAP\nResiduals","Rock\nCover\n2015")
Hypo.ly<-matrix(c(  1,    0.4, #Shrub Cover 2015
                    1,   -0.25, #Shrub Cover 2004
                    0.25,-1.1, #Introduced Cover 2015
                   -0.25,-1.1, #Introduced Cover 2004
                   -1.35, .25, #Most Recent FRI 2015
                   -1.35, -0.25, #Most Recent FRI 2004
                   -1,   -0.6,  #Rbrns1878.2015
                   -1.1,   -1.1, #Rbrns1878.2004
                   -1.1,    1.1, #dnbr2008
                   -1,    0.6, #dnbr2003
                   -0.25, 1.1, #MAP
                    0.25, 1.0), #Rock.2015
                ncol=2,byrow=TRUE)


semPaths(Hypothetical.mod.fit,"path",
         layout=Hypo.ly,
         nodeLabels=Hypo.lbls,# Variable Labels
         #layout="tree3",
         esize=3,
         intercept=FALSE, #removes intercepts
         residuals=FALSE, #Removes residuals
         edge.col=("Black"),
         posCol=c("Black",1),#color of positive lines
         negCol=c("Black",1),# Color of negative lines
         nDigits=1,#number of significant digits
         edge.label.position= 0.55,# moves where the estimates are located along the lne
         edge.label.cex=5,#Estimate font size
         label.scale=FALSE,#Size of the variable fonts are all the same
         sizeMan=12,#Box sizes
         sizeMan2 = 10,
         font=11,#Specific font
         asize=4, #arrowhead size
         label.cex=1.25,
         #cardinal="all" ,
         #curvature=1.5, 
         #curvePivot=.2, # turns the lines sharpley
         fade=FALSE
         
)#1600x20
Message has been deleted

Terrence Jorgensen

unread,
Nov 23, 2018, 10:45:33 AM11/23/18
to lavaan
I wrote code to do an SEM using lavaan 6months+ ago.  The code worked beautifully then; I am having issues with it today.  Specifically, I get this error code when running semPaths in semPlot.  Any thoughts on what's wrong today?  

Are you using a development version, or the versions on CRAN?  

sessionInfo()

If the error occurs with the CRAN versions, try the development version of lavaan, in case the issue has already been resolved.


If the error persists, you should try sending your data and syntax to the semPlot developer so he can see what is going wrong.


Terrence D. Jorgensen
Assistant Professor, Methods and Statistics
Research Institute for Child Development and Education, the University of Amsterdam

Reply all
Reply to author
Forward
0 new messages