saving a distribution in a variable?

22 views
Skip to first unread message

Igor Yanovich

unread,
Apr 24, 2025, 5:39:59 AMApr 24
to OxCal
Dear everyone, 

Using the OxCal 4.4.4 on the web server, I'm trying to code a model with several different offsets. But I seem to be not getting the syntax right, and would be very grateful for help. 

Here's a minimal example: 

a = R_Date(2340, 145);
charcoal = Exp(0.1, 0, 100);
a1 = a - charcoal;
a2 = R_Date(2340, 145) - Exp(0.1, 0, 100);

Now, a2 contains a shifted date as desired. But a1 seems to be unevaluated. What am I doing wrong in the syntax here? 

Thank you very much! 

Last but not least: a separate very big thank you for the wonderful calibration program that OxCal is! 

All the best,
 Igor

Christopher Ramsey

unread,
Apr 24, 2025, 5:59:08 AMApr 24
to OxCal group
Dear Igor

Many thanks I think you are doing essentially the right thing. There are some error messages but I think that is just because of a detail.

On the Exp function the first numerical parameter is the time constant of the decay/rise (not one over that). For a mean 10 year offset then I think you want:

a = R_Date(2340, 145);
charcoal = Exp(-10,0,100);
a1 = Date(a + charcoal);
a2 = Date(R_Date(2340, 145) + Exp(-10,0, 100));

A couple of other points then:

First - remember that the time line in OxCal is time not age - so if you add a positive distribution like charcoal to the age that will bring the date younger which is I imagine what you want.

Second - when you do a calculation the type of the output may not be clear - here I have set the type to Date to make clear that the results are intended to be dates rather than intervals or some other kind of parameter.

Finally - if you need to force the program to run an MCMC process you can include the MCMC_Sample() command to force it to do so.

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 visit https://groups.google.com/d/msgid/oxcal/3ff27189-20b9-4106-97a1-a0b70d1c5075n%40googlegroups.com.

Igor Yanovich

unread,
Apr 24, 2025, 11:11:37 AMApr 24
to ox...@googlegroups.com
Dear Christopher, 

Thank you _very_ much! This is extremely helpful! 
And once again (I cannot say this enough…) - thank you so much for all the work that went into OxCal! 

All the best,
 Igor

You received this message because you are subscribed to a topic in the Google Groups "OxCal" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/oxcal/GzUum728teY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to oxcal+un...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/oxcal/714F2F34-94C3-4818-9E97-C5024A69CFFE%40arch.ox.ac.uk.

Reply all
Reply to author
Forward
0 new messages