R Under development (unstable) (2025-10-01 r88895 ucrt) -- "Unsuffered Consequences" Copyright (C) 2025 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > library(MixStable) Attaching package: 'MixStable' The following object is masked from 'package:graphics': clip > # 📊 Generate data > x_vals <- seq(-5, 5, length.out = 100) > data <- rnorm(1000) > > # 🧮 Compute PDF > pdf_vals <- r_stable_pdf(x_vals, alpha = 1.5, beta = 0.5, scale = 1, location = 0) > # 📊 Generate 1200 samples from a stable distribution > samples <- rstable(n = 1200, alpha = 1.2, beta = 0.5, gamma = 1, delta = 3, pm = 1) > # 🧮 Estimate initial parameters > params <- stable_fit_init(data) > > > # 📈 Plot > plot(x_vals, pdf_vals, type = "l", col = "blue", main = "Stable Distribution PDF", + xlab = "x", ylab = "Density") > # 📋 Display summary > summary(samples) Min. 1st Qu. Median Mean 3rd Qu. Max. -487.2512 0.7677 1.7229 2.5351 2.9075 589.5503 > # 📋 Display > cat(sprintf("alpha: %.3f, beta: %.3f, gamma: %.3f, delta: %.3f\n", + params$alpha, params$beta, params$gamma, params$delta)) alpha: 1.975, beta: -0.135, gamma: 0.713, delta: 0.008 > > proc.time() user system elapsed 3.84 0.46 4.20