KDE_Plot query with cross-referenced dates

97 views
Skip to first unread message

Erik Marsh

unread,
Feb 24, 2025, 2:47:27 PM2/24/25
to OxCal
Hi all – I want to make a KDE summary of dates from a stratigraphic sequence (code below).

I cross-referenced the dates into a KDE (following Bronk Ramsey's suggestion). Since the dates are constrained by the stratigraphic sequence and its boundaries, I expected the KDE to be similarly constrained. But no, the trend is smeared and the beginning and ending tails are too long, running centuries into the future, past AD 2000. This happened with all three varieties of KDE: an unmodeled KDE Plot, a KDE Model, and a modeled KDE Plot (this last option models dates by stratigraphy AND a uniform phase, which I don't want). I don't understand why this happens – if the KDEs are using the calibrated posteriors, why would they be smearing past the boundaries from the stratigraphic sequence?

I also tried an modeled KDE_Plot around the entire model, but this includes the boundaries as parameters, which I don't want.

So how can I summarize the (posterior) dates in my sequence as a KDE?
Even better would be a KDE that can give me reliable First and Last queries.

thanks! –Erik


Sequence("Stratigraphic sequence")
{
Boundary("Start");
R_Date("date 1")...
R_Date("date 2")...
R_Date("date 3")...
Boundary("End",AD(2000));
};

KDE_Plot("unmodeled KDE")
{
Date("=date 1")...
Date("=date 2")...
Date("=date 3")...
};

KDE_Model("KDE Model")
{
Date("=date 1")...
Date("=date 2")...
Date("=date 3")...
};

Sequence()
{
Date("=Start");
KDE_Plot("modeled KDE within boundaries")
{
Date("=date 1")...
Date("=date 2")...
Date("=date 3")...
};
Date("=End");
};

KDE_Plot("unmodeled KDE for entire sequence, including boundaries")
{
Sequence("Stratigraphic sequence")
{
Boundary("Start");
R_Date("date 1")...
R_Date("date 2")...
R_Date("date 3")...
Boundary("End",AD(2000));
};
};

Helene Agerskov Rose

unread,
Feb 26, 2025, 2:31:09 AM2/26/25
to OxCal
Hi Erik,

I usually just include the KDE_Plot fucntion directly into my model with no need for cross referencing dates. It does tend to have long tails, as everything we work with, but not alarmingly so in my experience.

Hope this helps.

Best regards,
Helene

Christopher Ramsey

unread,
Feb 26, 2025, 5:40:15 AM2/26/25
to OxCal group
Dear Erik

The tails will inevitably be long for small datasets as there are few points on which to base this. KDE_Plot when nested in a phase model like:

Sequence("Stratigraphic sequence")
{
Boundary("Start");
KDE_Plot()
{
R_Date("date 1")...
R_Date("date 2")...
R_Date("date 3")...
};
Boundary("End",AD(2000));
};

which is equivalent to:

Sequence("Stratigraphic sequence")
{
Boundary("Start");
Phase()
{
R_Date("date 1")...
R_Date("date 2")...
R_Date("date 3")...
};
Boundary("End",AD(2000));
};


will truncate the KDE distributions a the boundary - so that might help. The following:

Sequence("Stratigraphic sequence")
{
Boundary("Start");
KDE_Plot()
{
Sequence()
{
R_Date("date 1")...
R_Date("date 2")...
R_Date("date 3")...
};
};
Boundary("End",AD(2000));
};

will also work in this way.

Note that KDE_Plot does not affect the marginal posteriors for the dates - or add anything to the model it just generates a KDE distribution for the marginal posteriors. If used in isolation as with the cross reference this KDE distribution is unbounded and will have long tails. If within Boundaries the distribution is allowed to have an abrupt drop (it would be abrupt if the Boundary was very well constrained).

As an example demonstrating the difference of the two approaches look at:

Plot()
{
Sequence("Stratigraphic sequence")
{
Boundary("Start",BC(1600));
KDE_Plot()
{
Sequence()
{
R_Date("date 1",3300,30);
R_Date("date 2",3300,30);
R_Date("date 3",3200,30);
R_Date("date 4",3200,30);
R_Date("date 5",3100,30);
R_Date("date 6",3100,30);
R_Date("date 7",3000,30);
R_Date("date 8",3000,30);
};
};
Boundary("End",BC(1250));
};
KDE_Plot()
{
Date("=date 1");
Date("=date 2");
Date("=date 3");
Date("=date 4");
Date("=date 5");
Date("=date 6");
Date("=date 7");
Date("=date 8");
};
};


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/daa9c6c6-a367-4b87-a4fa-46042dadf5een%40googlegroups.com.
>
>

Erik Marsh

unread,
Mar 2, 2025, 8:01:34 AM3/2/25
to OxCal
Thanks Christopher, this works! The KDE_Plot around the sequence is very helpful and answers my question. I also see I can get the same result like this, which also excludes boundaries from the KDE.

Sequence("Stratigraphic sequence")
{
Boundary("Start");
Sequence()
{
R_Date("date 1")...
R_Date("date 2")...
R_Date("date 3")...
KDE_Plot("KDE Plot excluding boundaries");
};
Boundary("End",AD(2000));
};

Reply all
Reply to author
Forward
0 new messages