Re: Lavaan

50 views
Skip to first unread message
Message has been deleted

balal izanloo

unread,
Jun 7, 2020, 4:29:35 AM6/7/20
to lav...@googlegroups.com
Hi
it is depend to your model and the analysis model you want. what kind of analysis do you want to do? 

On Sun, Jun 7, 2020 at 12:55 PM Javed Khorajia <jsjk...@gmail.com> wrote:
I have read the manual of Lavaan. Did not understand anything. Want to know if there is a simple way to learn. There are many codes which I do not understand.  
model <- '
        level: 1
            fw =~ y1 + y2 + y3
            fw ~ x1 + x2 + x3
        level: 2
            fb =~ y1 + y2 + y3
            fb ~ w1 + w2
Like fw, fb, y1, w1

What is meant by fw, fb, etc is not explained. 


model syntax 1 (do I have to copy paste the same in my example, or there will be change?
y ~ f1 + f2 + x1 + x2 
f1 ~ f2 + f3 
f2 ~ f3 + x1 + x2


--
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/2920f4ed-61ee-43a5-a9f8-aba943270ca6o%40googlegroups.com.
Message has been deleted
Message has been deleted

balal izanloo

unread,
Jun 7, 2020, 5:28:15 AM6/7/20
to lav...@googlegroups.com
as you told before you are not familiar with lavaan syntax, so you have to send your model to clarify it for the lavaan group. If you want to do confirmatory factor analysis (CFA) hear is a good example for it and if you want to do structural equation modeling (SEM) read this example.
Best 

On Sun, Jun 7, 2020 at 1:25 PM Javed Khorajia <jsjk...@gmail.com> wrote:
Thank You for the Reply. I want to do Structural Equation Modelling.


On Sunday, 7 June 2020 13:59:35 UTC+5:30, balal izanloo wrote:
Hi
it is depend to your model and the analysis model you want. what kind of analysis do you want to do? 

On Sun, Jun 7, 2020 at 12:55 PM Javed Khorajia <jsjk...@gmail.com> wrote:
I have read the manual of Lavaan. Did not understand anything. Want to know if there is a simple way to learn. There are many codes which I do not understand.  
model <- '
        level: 1
            fw =~ y1 + y2 + y3
            fw ~ x1 + x2 + x3
        level: 2
            fb =~ y1 + y2 + y3
            fb ~ w1 + w2
Like fw, fb, y1, w1

What is meant by fw, fb, etc is not explained. 


model syntax 1 (do I have to copy paste the same in my example, or there will be change?
y ~ f1 + f2 + x1 + x2 
f1 ~ f2 + f3 
f2 ~ f3 + x1 + x2


--
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 lav...@googlegroups.com.

--
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.
Message has been deleted

car...@web.de

unread,
Jun 7, 2020, 6:31:18 AM6/7/20
to lav...@googlegroups.com
Do you have experience with SEM? Do you have experience with R?
Am 07.06.20, 11:47 schrieb KJ <jsjk...@gmail.com>:
I need to conduct SEM in CFA category with Path computation.  

--
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.
Message has been deleted
Message has been deleted

Nickname

unread,
Jun 8, 2020, 10:21:48 AM6/8/20
to lavaan
Javed,
  It sound ad if you are trying to learn too much all at once.  My suggestion would be to break the task down into more manageable pieces.

1. Put away your data for a while and focus on running and modifying lavaan examples to gain familiarity and comfort with the interface.  For example, try running the same CFA using different methods to fix the scales of the latent variables.  The lavaan HTML tutorial and the model.syntax help file are both helpful.

2. Have a look at as much (little) as you need of the R data Input-Output manual and practice with a simple data set.  Go to the CRAN web site and click "Manuals" on the navigation pane.  Personally, I like to read and write csv files but it is a matter of taste.

3. Have you read a comprehensive SEM text book?  Any text worth its salt should explain the difference between CFA and path analysis and also offer a guide to the basic steps involved in a SEM analysis.  I teach using Rex Kline's book.

4. The piece that seems to be confusing you is this:  Reading data into your R workspace makes it available for analysis, but that is a prior and separate step from identifying to lavaan what data from your workspace you want to apply the analysis too.  Variable names play a critical role in mapping your model onto your data in a SEM analysis.  All of the observed variables referenced in a model must be referred to by the same names as they are referred to in the data itself.  That includes case sensitivity.  You will supply lavaan with both a model and a data set.  Lavaan will map the model onto the data using your variable names.  In contrast to observed variables, latent variables occur only in the model, and thus are not mapped onto the data.

In the multilevel example that you copied, the variable name conventions appear to work as follows:
y1, ... : observed indicators
x1, w1, ...: observed causal variables at each level
fb, fw:  common factors (f) that are either varying between clusters (b) or within clusters (w).  These are latent variables that do not appear in the data.

Here are some useful R functions for investigating a data set once read into R:
dim(myData)
names(myData)
str(myData)
head(myData)
summary(myData)

Good luck,
Keith
------------------------
Keith A. Markus
John Jay College of Criminal Justice, CUNY
http://jjcweb.jjay.cuny.edu/kmarkus
Frontiers of Test Validity Theory: Measurement, Causation and Meaning.
http://www.routledge.com/books/details/9781841692203/

Reply all
Reply to author
Forward
0 new messages