Using MCMC simulation in Summed Probability Density.

42 views
Skip to first unread message

엄교진

unread,
Jun 4, 2024, 6:32:46 AMJun 4
to OxCal
Hello,
I've been making a Summed  Probability Density with 20 data by applying Intcal 20 curves.
I also want to run an MCMC simulation with these data.
The problem is that I'm relatively new to using OxCal, so can't make complicated codes. 

I made this code below,

 Plot()
{
Boundary();
{
Date("a",3010,60)
Date("b",2990,50)
Date("c",2990,50)
Date("d",2950,50)
Date("e",2930,60)
Date("f",2930,50)
Date("g",2900,50)
Date("h",2850,60)
Date("i",2840,50)
Date("j",2850,50)
Date("k",2840,50)
Date("l",2840,50)
Date("m",2850,50)
Date("n",2810,50)
Date("o",2750,50)
Date("p",2740,50)
Date("q",2550,50)
Date("r,2470,80)
Date("s",2470,60)
Date("t",2300,50)
};
Order();
Boundary();
MCMC_Sample("MCMC_Sample.csv", 10, 1000);
};

and it doesn't work properly. 
The alert said,
Cannot parse OxCal output:
SyntaxError: Unexpected token '}'

Can you check it and please find the errors?
Thanks a lot for any help with it.

Christopher Ramsey

unread,
Jun 4, 2024, 6:50:50 AMJun 4
to OxCal group
Thank you for your email. If you are starting out with OxCal it is best not to immediately try to write code - or at least if you do to use the "Model" view to check it. Using the Tools menu allows you to create single phase models (as I assume you want here) and there are lots of examples to get you going in the online help files - in the publications - or in the discussion group.

You have two boundaries - but no phase. Also all the intervening lines are missing semi-colons - and I assume you want R_Date rather than just date. All these would be fixed by using the editing tools rather than by directly typing code - or by reading through the manual...

There is also the question of why you want to use Sum when this is not ideal for looking at distributions. For a single phase model KDE_Plot might be better. The following code should do what you want (which gives both the Sum and KDE_Plot) is:

Plot()
{
Sequence()
{
Boundary("Start 1");
Phase("1")
{
R_Date("a",3010,60);
R_Date("b",2990,50);
R_Date("c",2990,50);
R_Date("d",2950,50);
R_Date("e",2930,60);
R_Date("f",2930,50);
R_Date("g",2900,50);
R_Date("h",2850,60);
R_Date("i",2840,50);
R_Date("j",2850,50);
R_Date("k",2840,50);
R_Date("l",2840,50);
R_Date("m",2850,50);
R_Date("n",2810,50);
R_Date("o",2750,50);
R_Date("p",2740,50);
R_Date("q",2550,50);
KDE_Plot();
Sum();
Order();
};
Boundary("End 1");
};
MCMC_Sample("MCMC_Sample.csv", 10, 1000);
};

Best wishes

Christopher
> --
> You received this message because you are subscribed to the Google Groups "OxCal" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to oxcal+un...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/oxcal/64ae747d-c868-465b-b0dd-539a72d4a3c4n%40googlegroups.com.

엄교진

unread,
Jun 4, 2024, 7:25:59 AMJun 4
to OxCal
Thanks a lot for your help.
 Yes, I wanted to use the R_data. Also, I used the Sum because that code was the only one I could write.
I'll keep trying to use the 'model' view too. 

By the way, the code you sent me ran well. 
This OxCal Google group helped me a lot to study about the program.
I appreciate your help.

Regard
Kyojin.
2024년 6월 4일 화요일 오후 7시 50분 50초 UTC+9에 Christopher Ramsey님이 작성:
Reply all
Reply to author
Forward
0 new messages