nonrecursive model for peer influences data
play

Nonrecursive Model for Peer-Influences Data Variables in the Model - PowerPoint PPT Presentation

x 3 x 1 x 4 y 5 y 6 e 7 e 8 s 78 s 14 g 51 g 52 g 63 g 64 b 56 b 65 x 2 Nonrecursive Model for Peer-Influences Data Variables in the Model The R Statistical Computing Environment A nonrecursive model, from Duncan, Haller, and Portess (1968)


  1. x 3 x 1 x 4 y 5 y 6 e 7 e 8 s 78 s 14 g 51 g 52 g 63 g 64 b 56 b 65 x 2 Nonrecursive Model for Peer-Influences Data Variables in the Model The R Statistical Computing Environment A nonrecursive model, from Duncan, Haller, and Portes’s (1968) Basics and Beyond study of peer influences on the aspirations of high-school students, appears in the following figure. Structural Equation Models with the sem package Variables: x 1 , respondent’s IQ John Fox x 2 , respondent’s family SES x 3 , best friend’s family SES McMaster University x 4 , best friend’s IQ y 5 , respondent’s occupational aspiration ICPSR/Berkeley 2016 y 6 , best friend’s occupational aspiration. So as not to clutter the diagram, only one exogenous covariance, σ 14 , is shown. John Fox (McMaster University) Structural Equation Models ICPSR/Berkeley 2016 1 / 26 John Fox (McMaster University) Structural Equation Models ICPSR/Berkeley 2016 2 / 26 Nonrecursive Model for Peer-Influences Data Nonrecursive Model for Peer-Influences Data Path Diagram Conventions 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 coefficient. A bidirectional (two-headed) arrow represents a covariance, between exogenous variables or between errors, that is not given causal interpretation. I give each variable in the model ( x , y , and ε ) a unique subscript; I find that this helps to keep track of variables and coefficients. John Fox (McMaster University) Structural Equation Models ICPSR/Berkeley 2016 3 / 26 John Fox (McMaster University) Structural Equation Models ICPSR/Berkeley 2016 4 / 26

  2. Nonrecursive Model for Peer-Influences Data Nonrecursive Model for Peer-Influences Data Structural Equations Structural Equations I’ll usually simplify the structural equations by suppressing the subscript i for observation; 1 The structural equations of a model can be read straightforwardly expressing all x s and y s as deviations from their populations means 2 (and, later, from their means in the sample). from the path diagram. For the Duncan, Haller, and Portes peer-influences model: Putting variables in mean-deviation form gets rid of the constant terms (here, γ 50 and γ 60 ) from the structural equations (which are y 5 i γ 50 + γ 51 x 1 i + γ 52 x 2 i + β 56 y 6 i + ε 7 i = rarely of interest), and will simplify some algebra later on. y 6 i γ 60 + γ 63 x 3 i + γ 64 x 4 i + β 65 y 5 i + ε 8 i = Applying these simplifications to the peer-influences model: y 5 γ 51 x 1 + γ 52 x 2 + β 56 y 6 + ε 7 = γ 63 x 3 + γ 64 x 4 + β 65 y 5 + ε 8 y 6 = John Fox (McMaster University) Structural Equation Models ICPSR/Berkeley 2016 5 / 26 John Fox (McMaster University) Structural Equation Models ICPSR/Berkeley 2016 6 / 26 Nonrecursive Model for Peer-Influences Data Nonrecursive Model for Peer-Influences Data Estimation Using the sem Package in R Estimation Using the sem Package in R The tsls function in the sem package is used to estimate structural The sem function may be used to fit a wide variety of models — equations by 2SLS. including observed-variable nonrecursive models — by FIML. The function works much like the lm function for fitting linear models The “data” for the model may be specified either in the form of a by OLS, except that instrumental variables are specified in the covariance matrix (or raw-moment matrix) or as case-by-variable data instruments argument as a “one-sided” formula. in the form of an R data frame; in either case, the first argument to For example, to fit the first equation in the Duncan, Haller, and sem is a description of the model to be fit. Portes model, we would specify something like For moment-matrix input, there are three required arguments: eqn.1 <- tsls(ROccAsp ~ RIQ + RSES + FOccAsp, model : A coded formulation of the model, described below. S : The covariance matrix (or raw-moment matrix) among the observed instruments= ~ RIQ + RSES + FSES + FIQ, data=DHP) variables in the model; may be in upper- or lower-triangular form as summary(eqn.1) well as the full, symmetric matrix. This assumes that we have Duncan, Haller, and Portes’s data in the N : The number of observations on which the moment matrix is based. data frame DHP , which is not the case. In addition, for an observed-variable model, the argument fixed.x should be set to the names of the exogenous variables in the model. tsls can also perform weighted 2SLS estimation. John Fox (McMaster University) Structural Equation Models ICPSR/Berkeley 2016 7 / 26 John Fox (McMaster University) Structural Equation Models ICPSR/Berkeley 2016 8 / 26

  3. ROccAsp RIQ sigma78 sigma77 sigma88 beta56 beta65 FOccasp FSES FIQ RSES Nonrecursive Model for Peer-Influences Data Nonrecursive Model for Peer-Influences Data Estimation Using the sem Package in R Estimation Using the sem Package in R If the original data set is available it is generally advantageous to use Internally, sem represents the model using a format called the it; for example, it is then possible to obtain robust estimates of “recticular-action model” (or RAM), which stems from an approach, coefficient standard errors. For data-set input, there are two required due originally to McArdle, to specifying and estimating SEMs. arguments: The RAM model can be specified directly using the specifyModel model : As before. function in the sem package, which returns a model-specification data : An R data frame containing the data from which the covariance object to be used as the first argument to sem : or raw moment matrix of the observed variables is computed. Each structural coefficient of the model is represented as a directed In addition to fixed.x , there are two other arguments that are often arrow -> . useful: Each error variance and covariance is represented as a bidirectional formula : A one-sided R “model formula” to be applied to data to arrow, <-> , linking an endogenous variables to itself or two endogenous produce a numeric data matrix from which moments are computed; the variables, though specifyModel will by default supply error variances default is ~. . automatically for the endogenous variables in the model if these aren’t raw : If TRUE (the default depends upon context but is typically given explicitly. FALSE ), a raw-moment matrix is used rather than a covariance matrix, To write out the model in the form required by specifyModel , it permitting the estimation of regression intercepts. helps to redraw the path diagram, as in the following figure. Additional arguments are available. John Fox (McMaster University) Structural Equation Models ICPSR/Berkeley 2016 9 / 26 John Fox (McMaster University) Structural Equation Models ICPSR/Berkeley 2016 10 / 26 Nonrecursive Model for Peer-Influences Data Nonrecursive Model for Peer-Influences Data Estimation Using the sem Package in R Modified path diagram omitting covariances among exogenous variables, and showing error variances and covariances as double arrows attached to Then the model can be encoded as follows, specifying each arrow, the endogenous variables. and giving a name to and start-value for the corresponding parameter ( NA = let the program compute the start-value): model.DHP.1 <- specifyModel() RIQ -> ROccAsp, gamma51, NA gamma51 RSES -> ROccAsp, gamma52, NA FSES -> FOccAsp, gamma63, NA FIQ -> FOccAsp, gamma64, NA FOccAsp -> ROccAsp, beta56, NA gamma63 ROccAsp -> FOccAsp, beta65, NA ROccAsp <-> ROccAsp, sigma77, NA FOccAsp <-> FOccAsp, sigma88, NA gamma64 ROccAsp <-> FOccAsp, sigma78, NA John Fox (McMaster University) Structural Equation Models ICPSR/Berkeley 2016 11 / 26 John Fox (McMaster University) Structural Equation Models ICPSR/Berkeley 2016 12 / 26

Recommend


More recommend