rstan-to-pystan

Translate RStan statistical models and R data scripts into PyStan 3 code.

Updated Feb 24, 2026
One-click install
npx skills add https://github.com/Zurybr/lefarma-skills --skill rstan-to-pystan-zurybr
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: rstan-to-pystan
Source: https://github.com/Zurybr/lefarma-skills/tree/main/letta/benchmarks/trajectory-only/rstan-to-pystan
Command: npx skills add https://github.com/Zurybr/lefarma-skills --skill rstan-to-pystan-zurybr

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This skill helps users convert statistical models and data preparation code from R's RStan package to Python's PyStan package, facilitating migration between statistical computing environments.

Core Features & Use Cases

  • Code Translation: Converts RStan syntax and data structures to PyStan 3 equivalents.
  • Workflow Migration: Assists in moving Bayesian inference workflows from R to Python.
  • Data Mapping: Provides guidance on translating R data preparation functions to Python (e.g., using pandas and numpy).
  • Use Case: A researcher has a complex Bayesian model implemented in RStan and needs to integrate it into a Python-based data analysis pipeline. This skill guides them through the translation process.

Quick Start

Use the rstan-to-pystan skill to translate the provided RStan model code and data preparation script into PyStan 3.

Frequently Asked Questions about rstan-to-pystan

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

FAQPage Schema
How do I convert RStan code to PyStan 3?

To convert RStan code to PyStan 3, translate the statistical models and associated R data preparation scripts into equivalent PyStan 3 syntax. This involves adapting R data manipulation to Python using pandas and numpy.

What is the process for migrating Bayesian inference workflows from R to Python?

Migrating Bayesian inference workflows from R to Python requires mapping RStan statistical models and R data structures to PyStan 3 equivalents. This process addresses API differences and adapts R data preparation functions for Python integration.

Do I need to understand Stan and R data structures to translate RStan models to Python?

Yes, successfully translating RStan models to PyStan requires understanding the Stan language, R data structures, and PyStan 3 API differences. This knowledge ensures accurate code translation and workflow migration.

Can I translate R data preparation scripts to Python for PyStan models?

Yes, you can translate R data preparation scripts to Python for PyStan models. The translation provides guidance on converting R data preparation functions to Python equivalents using libraries like pandas and numpy.

What's the best way to integrate an RStan Bayesian model into a Python data analysis pipeline?

The best way to integrate an RStan Bayesian model into a Python pipeline is translating the RStan model code and data preparation scripts into PyStan 3 code, bridging the gap between R and Python environments.