LINESTX ทำการวิเคราะห์การถดถอยเชิงเส้น (Linear Regression) โดยใช้วิธี Least Squares เพื่อหาเส้นตรงที่เหมาะสมที่สุดกับข้อมูล ส่งกลับตารางสถิติที่ประกอบด้วย Slope Intercept Standard Error R-squared และสถิติอื่น ๆ ใช้สำหรับสร้างแบบจำลองการทำนาย (Predictive Model) และวิเคราะห์ความสัมพันธ์ระหว่างตัวแปร
=LINESTX(<Table>, <DependentExpression>, <IndependentExpression>, [...])
=LINESTX(<Table>, <DependentExpression>, <IndependentExpression>, [...])
| Argument | Type | Required | Default | Description |
|---|---|---|---|---|
| Table | table | Yes | ไม่มี | ตารางข้อมูล |
| DependentExpression | expression | Yes | ไม่มี | ตัวแปรตาม (Y) – ค่าที่ต้องการทำนาย |
| IndependentExpression | expression | Yes | ไม่มี | ตัวแปรอิสระ (X) – ตัวแปรทำนาย (สามารถหลายตัว) |
LINESTX(Properties, Properties[Price], Properties[Size])=LINESTX(Properties, Properties[Price], Properties[Size])
ตารางสถิติ 10 คอลัมน์
LINESTX(Properties, Properties[Price], Properties[Size], Properties[Rooms], Properties[Age])=LINESTX(Properties, Properties[Price], Properties[Size], Properties[Rooms], Properties[Age])
ตารางสถิติ 10 คอลัมน์
INDEX(LINESTX(...), 3, 1)=INDEX(LINESTX(...), 3, 1)
0.85
ตารางที่มี Slopes Intercepts Standard Errors R² F-statistic Degrees of freedom ต้องใช้ INDEX ดึงค่าที่ต้องการ
สร้าง Predictive Models ทำนายค่า Y จาก X และวัด Fit Quality ของโมเดล
ตาราง LINESTX มี 10 คอลัมน์ ต้องหา Column Index ที่ถูก ไม่ค่อยทำให้ error ถ้าไม่ระวัง
LINESTX