> model <- '
# latent variables
Workload =~ Workload 1 + Workload 2 + Workload 3
Professional_Recognition =~ Recognition 1 + Recognition 2 + Recognition 3 + Recognition 4 + Recognition 5 + Recognition 6
Teacher Stress =~ Workload + Professional_Recognition
Student_Engagement =~ Student Engagement 1 + Student Engagement 2 + Student Engagement 3 + Student Engagement 4
Instructional_Strategies =~ Instructional Strategies 1 + Instructional Strategies 2 + Instructional Strategies 3 + Instructional Strategies 4
Teacher_Efficacy =~ Student_Engagement + Instructional_Strategies
Didactical_Pedagogical =~ Didactical Pedagogical 1 + Didactical Pedagogical 2 + Didactical Pedagogical 3 + Didactical Pedagogical 4 + Didactical Pedagogical 5 + Didactical Pedagogical 6 + Didactical Pedagogical 7
Cirricular_Autonomy =~ Cirricular Autonomy 1 + Cirricular Autonomy 2 + Cirricular Autonomy 3 + Cirricular Autonomy 4 + Cirricular Autonomy 5
Teacher Autonomy =~ Didactical_Pedagogical + Cirricular Autonomy
Teacher_Centrism =~ Teacher Centrism 1 + Teacher Centrism 2 + Teacher Centrism 3 + Teacher Centrism 4 + Teacher Centrism 5 + Teacher Centrism 6 + Teacher Centrism 7 + Teacher Centrism 8 + Teacher Centrism 9 + Teacher Centrism 10 + Teacher Centrism 11 + Teacher Centrism 12 + Teacher Centrism 13 + Teacher Centrism 14 + Teacher Centrism 15 + Teacher Centrism 16 + Teacher Centrism 17 + Teacher Centrism 18 + Teacher Centrism 19 + Teacher Centrism 20 + Teacher Centrism 21 + Teacher Centrism 22 + Teacher Centrism 23 + Teacher Centrism 24 + Teacher Centrism 25 + Teacher Centrism 26 + Teacher Centrism 27 + Teacher Centrism 28
# regressions
Teacher_Efficacy ~ Teacher_Stress
Teacher_Efficacy ~ Teacher_Autonomy
Teacher_Centrism ~ Teacher_Stress
Teacher_Centrism ~ Teacher_Autonomy
Teacher_Centrism ~ Teacher_Efficacy
Teacher_Stress ~ Teacher_Autonomy
> fit <- sem(model,data=PRETEND_DATA)
summary(fit)
library("stringr")
library("lavaan")
library("DiagrammeR")
library("dplyr")
library("semPlot")
model <- '
Workload =~ W1 + W2
Professional_Recognition =~ R1 + R2 + R3 + R4 + R5 + R6
Teacher_Stress =~ Workload + Professional_Recognition
Student_Engagement =~ SE1 + SE2 + SE3 + SE4
Instructional_Strategies =~ IS1 + IS2 + IS3 + IS4
Teacher_Efficacy =~ Student_Engagement + Instructional_Strategies
Didactical_Pedagogical =~ DP1 + DP2 + DP3 + DP4 + DP5 + DP6 + DP7
Cirricular_Autonomy =~ CA1 + CA2 + CA3 + CA4 + CA5
Teacher_Autonomy =~ Didactical_Pedagogical + Cirricular_Autonomy
Teacher_Centrism =~ TC1 + TC2 + TC3 + TC4 + TC5 + TC6 + TC7 + TC8 + TC9 + TC10 + TC11 + TC12 + TC13 + TC14 + TC15 + TC16 + TC17 + TC18 + TC19 + TC20 + TC21 + TC22 + TC23 + TC24 + TC25 + TC26 + TC27 + TC28
Teacher_Efficacy ~ Teacher_Stress
Teacher_Efficacy ~ Teacher_Autonomy
Teacher_Centrism ~ Teacher_Stress
Teacher_Centrism ~ Teacher_Autonomy
Teacher_Centrism ~ Teacher_Efficacy
Teacher_Stress ~ Teacher_Autonomy
fit <- sem(model)
summary(fit)
Regards,
Dave
On Oct 22, 2019, at 6:46 AM, Dave Bell <davealex...@gmail.com> wrote:
--
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/af4521f8-ff52-418d-8a5a-cae0afba424c%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to lav...@googlegroups.com.
Hi Dave,
You didn’t pass your data to lavaan. Assuming your data are called PRETEND_DATA, you would run
fit <- sem(model = model, data = PRETEND_DATA)
It sounds like just want to get a path diagram based on your correspondence with Yves.
If so,
semPaths(fit)
might be what you want instead of the data
argument.
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/e83fd520-1506-4190-9776-cdfb9c2ce895%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lavaan/e83fd520-1506-4190-9776-cdfb9c2ce895%40googlegroups.com.
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/8a6614c0-8f20-4308-bb12-6b3ce89395ee%40googlegroups.com.