xtmixed syntax in runmlwin

Welcome to the forum for runmlwin users. Feel free to post your question about runmlwin here. The Centre for Multilevel Modelling take no responsibility for the accuracy of these posts, we are unable to monitor them closely. Do go ahead and post your question and thank you in advance if you find the time to post any answers!

Go to runmlwin: Running MLwiN from within Stata >> http://www.bristol.ac.uk/cmm/software/runmlwin/
Post Reply
oshabcde
Posts: 1
Joined: Fri Apr 08, 2016 10:48 am

xtmixed syntax in runmlwin

Post by oshabcde »

I want to know how to replicate xtmixed command used by Roberto G. Gutierrez to smooth via penalized splines by using runmlwin command. Is it possible?

use http://www.stata.com/icpsr/mixed/motor, clear
local i 1
forvalues k = 1(1)60 {
gen time_‘i’ = cond(time - ‘k’ > 0, time - ‘k’, 0)
local ++i
}

xtmixed accel time || _all: time_*, noconstant cov(identity)

//The command that I have used is stated below.//

runmlwin accel times cons, level2(cons:bs*, elements(A) reset(all)) level1(id:cons) maxiterations(100) sd nopause
ChrisCharlton
Posts: 1384
Joined: Mon Oct 19, 2009 10:34 am

Re: xtmixed syntax in runmlwin

Post by ChrisCharlton »

The "motor" dataset that you reference seems to be no longer be available at that address, so I can't test this fully, but I think that the equivalent model would be something like:

Code: Select all

use http://www.stata.com/icpsr/mixed/motor, clear
local i 1
forvalues k = 1/60 {
  gen time_‘i’ = cond(time - ‘k’ > 0, time - ‘k’, 0)
  local ++i
}

local i 1
forvalues k = 2/60 {
  constraint define `i' [RP2]var(time_`k') = [RP2]var(time_1)
  local ++i
}

runmlwin accel time cons, level2(cons: time_*, diag) level1(id: cons) constraints(1/59) sd nopause
Post Reply