#Structural-equation models are multiple-equation regression #models in which the response variable in one regression equation can #appear as an explanatory variable in another equation. # #Two variables in an SEM can even affect one-another reciprocally, #either directly, or indirectly through a "feedback" loop. # #Structural-equation models can include variables that are not measured #directly, but rather indirectly through their effects (called indicators) or, #sometimes, through their observable causes. # #Unmeasured variables are variously termed - latent variables, constructs, #or factors. # #Endogenous variables are the response variables of the model. #There is one structural equation (regression equation) for each #endogenous variable. # #An endogenous variable may, however, also appear as an explanatory variable #in other structural equations. # #Exogenous variables appear only as explanatory variables in the #structural equations. #The values of exogenous variables are therefore determined outside #of the model. # #Path Diagrams #An intuitively appealing way of representing an SEM is in the form of #a causal graph, called a path diagram. # #Peer influences on the aspirations of high-school students #Duncan, Haller, and Portes (1968) # #The following conventions are used in the path diagram: # #A directed (single-headed) arrow represents a direct effect of one #variable on another; each such arrow is labelled with a structural #coefÞcient. # #A bidirectional (two-headed) arrow represents a covariance, between #exogenous variables or between errors, that is not given causal #interpretation. # #x1 -> y5 <- e7 #x2 -> y5 <- e7 #x3 -> y6 <- e8 #x4 -> y6 <- e8 # #y5 -> y6 #y5 <- y6 # #x1 <-> x2 <-> x3 <-> x4 #x1 <-> x3 #x2 <-> x4 #x1 <-> x4 # #e7 <-> e8 # #Endogenous variables: #y5 (respondent's aspiration) #y6 (best friend's aspiration) # #Exogenous variables: #x1 (respondent's IQ) #x2 (respondent's family SES) #x3 (best friend's family SES) #x4 (best friend's IQ) # #Errors: #e7 #e8 # #Structural coefÞcients (i.e., regression coefficients) representing the #direct (partial) effect: # #- of an exogenous on an endogenous variable, x on y: #gammak51, gamma52, gamma63, gamma64. # #- of an endogenous variable on another endogenous variable, y on y: #beta65, beta56 # #Covariances between: # #- two exogenous variables, x and x: #sigma12, sigma13, sigma14, sigma23, sigma24, sigma34 # #- two error variables, e and e: #sigma78 # #The structural equations of a model can be read straightforwardly from #the path diagram. # #y5 = gamma51x1 + gamma52x2 + beta56y6 + e7 #y6 = gamma63x3 + gamma64x4 + beta65y5 + e8 # #y5 - beta56y6 - gamma51x1 - gamma52x2 + 0x3 + 0x4 = e7 #- beta65y5 + y6 + 0x1 + 0x2 - gamma63x3 - gamma64x4 = e8 # # [ x1 ] #[ 1 -beta56 ][ y5 ] [-gamma51 -gamma52 0 0 ][ x2 ] [ e7 ] #[ -beta65 1 ][ y6 ] + [0 0 gamma63 gamma64 ][ x3 ] = [ e8 ] # [ x4 ] # # library(sem) # Duncan, Haller, and Portes's nonrecursive peer-influences model R.DHP <- matrix(c( # lower triangle of correlation matrix 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, .6247, 1, 0, 0, 0, 0, 0, 0, 0, 0, .3269, .3669, 1, 0, 0, 0, 0, 0, 0, 0, .4216, .3275, .6404, 1, 0, 0, 0, 0, 0, 0, .2137, .2742, .1124, .0839, 1, 0, 0, 0, 0, 0, .4105, .4043, .2903, .2598, .1839, 1, 0, 0, 0, 0, .3240, .4047, .3054, .2786, .0489, .2220, 1, 0, 0, 0, .2930, .2407, .4105, .3607, .0186, .1861, .2707, 1, 0, 0, .2995, .2863, .5191, .5007, .0782, .3355, .2302, .2950, 1, 0, .0760, .0702, .2784, .1988, .1147, .1021, .0931, -.0438, .2087, 1 ), ncol=10, byrow=TRUE) rownames(R.DHP) <- colnames(R.DHP) <- c('ROccAsp', 'REdAsp', 'FOccAsp', 'FEdAsp', 'RParAsp', 'RIQ', 'RSES', 'FSES', 'FIQ', 'FParAsp') R <- R.DHP[c(1, 3, 6:9), c(1, 3, 6:9)] R # path parameter start-value model.DHP.1 <- specify.model() RIQ -> ROccAsp, gamma51, NA RSES -> ROccAsp, gamma52, NA FSES -> FOccAsp, gamma63, NA FIQ -> FOccAsp, gamma64, NA FOccAsp -> ROccAsp, beta56, NA ROccAsp -> FOccAsp, beta65, NA ROccAsp <-> ROccAsp, sigma77, NA FOccAsp <-> FOccAsp, sigma88, NA ROccAsp <-> FOccAsp, sigma78, NA model.DHP.1 # #The first argument to sem is the model-specification object returned by #specify.model. # #The second argument is the input covariance matrix. # #The third argument is the number of observations on which the covariances #are based. # # sem.DHP.1 <- sem(model.DHP.1, R, 329, fixed.x=c('RIQ', 'RSES', 'FSES', 'FIQ')) summary(sem.DHP.1) # # # # - chi-square statistic indicates whether or not your model can be rejected (just look) - structural-equation modelers typically attend to the descriptive adequacy of the model - the GFI and AGFI are of little pratical value - the RMSEA (root mean-squared error approximation)is an estimate of the fit of the model - RMSEA < 0.05 is generally taken as a good fit to the data - Bayesian information criterion (BIC) is used to compare alternative models # # # # Duncan, Haller and Portes peer-influences model with multiple indicators # of latent endogenous variables R.DHP <- matrix(c( # lower triangle of correlation matrix (repeated) 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, .6247, 1, 0, 0, 0, 0, 0, 0, 0, 0, .3269, .3669, 1, 0, 0, 0, 0, 0, 0, 0, .4216, .3275, .6404, 1, 0, 0, 0, 0, 0, 0, .2137, .2742, .1124, .0839, 1, 0, 0, 0, 0, 0, .4105, .4043, .2903, .2598, .1839, 1, 0, 0, 0, 0, .3240, .4047, .3054, .2786, .0489, .2220, 1, 0, 0, 0, .2930, .2407, .4105, .3607, .0186, .1861, .2707, 1, 0, 0, .2995, .2863, .5191, .5007, .0782, .3355, .2302, .2950, 1, 0, .0760, .0702, .2784, .1988, .1147, .1021, .0931, -.0438, .2087, 1 ), ncol=10, byrow=TRUE) rownames(R.DHP) <- colnames(R.DHP) <- c('ROccAsp', 'REdAsp', 'FOccAsp', 'FEdAsp', 'RParAsp', 'RIQ', 'RSES', 'FSES', 'FIQ', 'FParAsp') model.DHP.3 <- specify.model() RParAsp -> RGenAsp, gam11, NA RIQ -> RGenAsp, gam12, NA RSES -> RGenAsp, gam13, NA FSES -> RGenAsp, gam14, NA RSES -> FGenAsp, gam23, NA FSES -> FGenAsp, gam24, NA FIQ -> FGenAsp, gam25, NA FParAsp -> FGenAsp, gam26, NA FGenAsp -> RGenAsp, beta12, NA RGenAsp -> FGenAsp, beta21, NA RGenAsp -> ROccAsp, NA, 1 # fixed parameter RGenAsp -> REdAsp, lam21, NA FGenAsp -> FOccAsp, NA, 1 # fixed parameter FGenAsp -> FEdAsp, lam42, NA RGenAsp <-> RGenAsp, ps11, NA FGenAsp <-> FGenAsp, ps22, NA RGenAsp <-> FGenAsp, ps12, NA ROccAsp <-> ROccAsp, theta1, NA REdAsp <-> REdAsp, theta2, NA FOccAsp <-> FOccAsp, theta3, NA FEdAsp <-> FEdAsp, theta4, NA model.DHP.3 sem.DHP.3 <- sem(model.DHP.3, R.DHP, 329, fixed.x=c('RParAsp', 'RIQ', 'RSES', 'FSES', 'FIQ', 'FParAsp')) summary(sem.DHP.3) # the model with equality constraints on corresponding parameters model.DHP.4 <- specify.model() RParAsp -> RGenAsp, gam1, NA, RIQ -> RGenAsp, gam2, NA, RSES -> RGenAsp, gam3, NA, FSES -> RGenAsp, gam4, NA, RSES -> FGenAsp, gam4, NA, FSES -> FGenAsp, gam3, NA, FIQ -> FGenAsp, gam2, NA, FParAsp -> FGenAsp, gam1, NA, FGenAsp -> RGenAsp, beta, NA, RGenAsp -> FGenAsp, beta, NA, RGenAsp -> ROccAsp, NA, 1, # fixed parameter RGenAsp -> REdAsp, lam, NA, FGenAsp -> FOccAsp, NA, 1, # fixed parameter FGenAsp -> FEdAsp, lam, NA, RGenAsp <-> RGenAsp, ps11, NA, FGenAsp <-> FGenAsp, ps11, NA, RGenAsp <-> FGenAsp, ps12, NA, ROccAsp <-> ROccAsp, theta1, NA, REdAsp <-> REdAsp, theta2, NA, FOccAsp <-> FOccAsp, theta1, NA, FEdAsp <-> FEdAsp, theta2, NA model.DHP.4 sem.DHP.4 <- sem(model.DHP.4, R.DHP, 329, fixed.x=c('RParAsp', 'RIQ', 'RSES', 'FSES', 'FIQ', 'FParAsp')) summary(sem.DHP.4)