DLNM Plotting

Generate 3D surface, contour, and slice plots from DLNM crosspred objects in R.

Updated Mar 7, 2026
One-click install
npx skills add https://github.com/ntluong95/agent-skills-statistics --skill dlnm-plotting
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: DLNM Plotting
Source: https://github.com/ntluong95/agent-skills-statistics/tree/main/skills/dlnm/plotting
Command: npx skills add https://github.com/ntluong95/agent-skills-statistics --skill dlnm-plotting

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps statisticians and researchers create clear, publication-quality visualizations of Distributed Lag Non-Linear Models (DLNM) results, making complex exposure-lag-response relationships understandable.

Core Features & Use Cases

  • 3D Surface Plots: Visualize the simultaneous effect of exposure and lag.
  • Contour Plots: Show isolines of relative risk across exposure and lag.
  • Slice Plots: Display specific exposure-response or lag-response curves.
  • Custom ggplot2 Plots: Extract data for fine-grained control over plot aesthetics for publications.
  • Use Case: After fitting a DLNM model to air pollution and temperature data, use this Skill to generate a 3D surface plot to show how both temperature and the lag period influence the relative risk of a health outcome.

Quick Start

Use the DLNM plotting skill to generate a 3D surface plot of the crosspred object named 'pred'.

Frequently Asked Questions about DLNM Plotting

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I visualize Distributed Lag Non-Linear Models results in R?▼

You can visualize Distributed Lag Non-Linear Models results by generating 3D surface plots, contour plots, and slice plots from crosspred objects to clearly interpret exposure-lag-response relationships.

What is the best way to plot a crosspred object for epidemiology data?▼

The best way to plot a crosspred object is by generating 3D surface plots or contour plots to display isolines of relative risk across exposure and lag periods for epidemiology data.

Can I extract DLNM model data for custom ggplot2 visualizations?▼

Yes, you can extract model data from crosspred objects to enable custom ggplot2 visualizations, providing fine-grained control over plot aesthetics for advanced publication customization.

Does this DLNM plotting approach support 3D surface and contour plots?▼

Yes, this DLNM plotting approach supports generating 3D surface plots to visualize the simultaneous effect of exposure and lag, alongside contour plots and slice plots for detailed analysis.

How do I show exposure-lag-response relationships using slice plots?▼

You show exposure-lag-response relationships by generating slice plots that display specific exposure-response or lag-response curves extracted from your fitted DLNM crosspred objects.