Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Specifying A Cross-Classified Piecewise Linear Model

    Dear Statalist,

    I am using mixed estimating a cross-classified piecewise linear model, where I have approximately 39,000 students nested within about 1,000 neighborhoods and 200 schools. Neighborhoods are crossed with schools. Each student has 4 observations over time.

    At first I ignored the school level. I ran a 3-level piecewise linear model with repeated observations (level 1) nested within students (level 2) and students nested within neighborhoods (level 3). The code is like:

    Code:
    mixed DV time1 time2 time3 IV1 IV2 || neighid: time || studentid: time, variance
    Now I wanted to include schools into the model as well, which turned into a cross-classified piecewise linear model. I have read some materials about cross-classified model. If each student only has one observation, the code will be like:

    Code:
    mixed DV IV1 IV2 || _all: R.schoolid || neighid:, variance
    But I'm not sure how to integrate the code for piecewise linear model and cross-classified model. What would be the right way to write the syntax?

    Thanks in advance for your help!
Working...
X