Hi everyone
I am trying to run MLWIN within R. I have used an example put together by the developers of the package (R2MLwiN) but get an error message that I cant figure out. Really appreciate a hand

I get the following message:

Cannot find worksheet: Settings/Temp/RtmpYpbSae/macrofile_103829e77324.txt
Cannot find macro: C:/DOCUME~1/mcfaddena/Local
Execution completed
Error in read.dta(IGLSfile) :
  unable to open file: 'No such file or directory'

When I run:

library(R2MLwiN)
## Specify the MLwiN folder as appropriate
mlwin ="C:/Program Files/MLwiN v2.27/"

## Read tutorial data from runmlwin (Leckie&Charlton, 2011) data folder
library(foreign); indata =read.dta("http://www.bristol.ac.uk/cmm/media/runmlwin/tutorial.dta")
head(indata)
## Alternatively converts tutorial.ws under mlwin sample folder to tutorial.dta
## MLwiN sample worksheet folder
#wsfile=paste(mlwin,"/samples/tutorial.ws",sep="")
## the tutorial.dta will be save under the temporary folder
#inputfile=paste(tempdir(),"/tutorial.dta",sep="")
#ws2foreign(wsfile, foreignfile=inputfile, MLwiNPath=mlwin)
#library(foreign); indata =read.dta(inputfile)

## Define the model
formula="normexam~(0|cons+standlrt)+(1|cons)"
levID='student'
## Choose IGLS algoritm for estimation
estoptions= list(EstM=0)
## Fit the model
mymodel=runMLwiN(formula, levID, D="Normal", indata, estoptions, MLwiNPath=mlwin, workdir = tempdir())

Kind regards

Andrew McFadden MVS BVSc | Veterinary Epidemiologist/Principal Adviser,


This email message and any attachment(s) is intended solely for the addressee(s)
named above. The information it contains is confidential and may be legally
privileged.  Unauthorised use of the message, or the information it contains,
may be unlawful. If you have received this message by mistake please call the
sender immediately on 64 4 8940100 or notify us by return email and erase the
original message and attachments. Thank you.

The Ministry for Primary Industries accepts no responsibility for changes
made to this email or to any attachments after transmission from the office.

	[[alternative HTML version deleted]]

