// SPDX-License-Identifier: MIT // Copyright (c) 2026 Incoprea // Measure paired linear association // Not compiled or tested in-world // Setup: Place in a spare owned prim. Set DATA as x/y pairs with at least two observations. Touch to run; output is private to the owner. // Stop / restore: Disable/remove. No scene changes or external calls. // Notes: Correlation describes linear association and does not establish causation. Constant input series are rejected. // License: see LICENSE in this distribution. // Original Incoprea. MIT. list DATA=[1.0,2.0,2.0,3.0,3.0,5.0,4.0,4.0]; default { touch_start(integer detectedCount) { if(llDetectedKey(0)!=llGetOwner())return; integer length=llGetListLength(DATA); if(length<4||length%2) { llOwnerSay("Need two or more pairs."); return; } float count=(float)(length/2); float mx; float my; integer i; for(i=0;i