290 likes | 528 Views
Learn about Ordinary Least Squares (OLS) and asymptotics in Multiple Regression Analysis. Understand the inference independently of assumptions and the normality assumption. Explore the challenges, potential biases, and implications of the assumptions in real-world data. Discover how OLS minimizes errors and solves problems through mathematical optimization methods.
E N D
Multiple RegressionAnalysis: OLS Asymptotics Dr. Woraphon Yamaka
Multiple RegressionAnalysis: Inference independently of สมมุติฐานนี้กำหนดให้ ค่าความคาดเคลื่อนมีการแจกแจงแบบปกติ (normal distribution) และนอกจากนี้ยังต้องมีตัวแปรต้น ที่มีการแจกแจงแบบปกติด้วย และ ทั้งตัวแปรต้นและค่าความคาดเคลื่อนจะไม่สัมพันธ์กัน กล่าวคือ Assumption MLR.6 (Normality of error terms)
Multiple RegressionAnalysis: Inference • Discussion of the normality assumption • ค่าค่าคลาดเคลื่อนคือค่าที่สะท้อนความผิดพลาดของแบบจำลองทั้งหมดที่เกิดขึ้น จากการที่เราประมาณและจากการที่เราไม่ได้คำนึงถึงตัวแปร x ที่ควรจะมี (กล่าวคือ เมื่อเราไม่ได้ใส่ตัวแปร x ที่มีผลต่อ y ลงไป ค่าความคาดเคลื่อนจะสูงขึ้น (omitted variable bias) ) • ค่าความคาดเคลื่อนต้องมีลักษณะการแจกแจงแบบปกติ • ปัญหาของสมมุติฐานนี้คือ: • ต้องการข้อมูลขนาดใหญ่ ถึงจะเข้าสู่ normal ซึ่งในความเป็นจริง เกิดยาก • ค่าความคาดเคลื่อนมีลักษณะแบบแจกแจงปกติ อาจไม่เป็นจริง เช่น ปัจจุบันพบว่าข้อมูลทางการเงินมีลักษณะแบบ student-t distribution ดังนั้น สมมุติฐานนี้ค่อนข้างเป็นจริงได้ยากในทางปฎิบัติ
Multiple RegressionAnalysis: Inference • Discussion of the normality assumption (cont.) • ยกตัวอย่างข้อมูลที่ไม่เป็นการแจกแจงปกตินี้: • ค่าแรง • ตัวแปรที่เป็นจำนวน • ตัวแปร dummy ( อยู่ในรูป 1 หรือ 0) • ในบางครั้งถ้าเราต้องการข้อมูลที่มีลักษณะที่เป็น normal เราอาจต้องแปลงข้อมูล ให้อยู่ในรูปของ log หรือ อัตราการเจริญเติบโต • ภายใต้ข้อสมมุตินี้ OLS จะไม่ bias • ถ้าข้อมูลมีจนาดใหญ่มากๆ ข้อมูลส่วนใหญ่จะมีโอกาสเป็นลักษณะ Normal ยิ่งขึ้น ( เช่น เราอาจเก็บข้อมูล สัก 1000 ตัวอย่าง)
OLS คืออะไร? มันคือวิธีการประมาณพารามิเตอร์ ไม่ใช่แบบจำลอง!!!!! ในบทนี้เราจะเรียนวิธีการประมาณ OLS ในแบบจำลอง Linear regression (สมการถดถอย) ซึ่งมีลักษณะดังนี้
simple Linear regression (กรณีมีพารามิเตอร์ค่าคงที่) y 0 x
Graphical for the relationship between X and Y (กรณีไม่มีพารามิเตอร์ค่าคงที่) y 0 x
In mathematical point of view Least squares หมายความว่า Least === Minimize Squares === ดังนั้นเรากำลังทำปัญหา minimization นั่นเอง พวกเราเคยเรียนมามาแล้วใน math econ เช่น ปัญหา Minimize Cost
เราแก้ปัญหา minimization อย่างไร? • เราใช้วิธีการทางคณิตศาสตร์ที่ชื่อว่า Lagrange multipliers • ดังนั้นปัญหา OLS ของเราจะสามารถทำได้โดย Objection Function
FOC , SOC FOC SOC
ตัวอย่างการคำนวณโดยใช้ตัวเลขจริงตัวอย่างการคำนวณโดยใช้ตัวเลขจริง สมมุติว่าเรามี 2 ชุดข้อมูล • X=(0,2,3,1,2,4,2,5,7,5) • Y=(0,4,6,2,4,8,4,10,14,10) • X=(0,2,3,1,2,4,2,5,7,5) • Y1=(1,5,7,3,5,9,5,11,15,11)
Example 1.1 X=(0,2,3,1,2,4,2,5,7,5) Y=(0,4,6,2,4,8,4,10,14,10) Ans กรณีนี้เรารู้ว่าสมการ linear regression ไม่ควรมี ดังนั้นเราเลยทำการประมาณ สมการนี้ จึงได้ผลการประมาณเท่ากับ 2 แปลว่า ถ้า X เปลี่ยนแปลงไป 1 % y จะ เปลี่ยนแปลงไปเท่ากับ นั้นคือ 2 % ในทิศทางเดียวกันนั่นเอง X’ y
Example 1.2 (กรณีที่ตั้งแบบจำลองผิด) X=(0,2,3,1,2,4,2,5,7,5) Y1=(1,5,7,3,5,9,5,11,15,11) X’ y
Example 1.3 X=(0,2,3,1,2,4,2,5,7,5) Y1=(1,5,7,3,5,9,5,11,15,11) X’ y
Multiple RegressionAnalysis: OLS Asymptotics Without assuming normality of the error term! • So far we focused on properties of OLS that hold for any sample • Properties of OLS that hold for any sample/sample size • Expected values/unbiasedness under MLR.1 – MLR.4 • Variance formulas under MLR.1 – MLR.5 • Gauss-Markov Theorem under MLR.1 – MLR.5 • Exact sampling distributions/tests under MLR.1 – MLR.6 • Properties of OLS that hold in large samples • Consistency under MLR.1 – MLR.4 • Asymptotic normality/tests under MLR.1 – MLR.5
Multiple RegressionAnalysis: OLS Asymptotics An estimator is consistent for a population parameter if for arbitrary and . ค่า parameter ที่ประมาณเข้าใกล้ค่าจริง Alternative notation: • Consistency • Interpretation: • Consistency คือความคงเส้นคงว่าของการประมาณ เมื่อจำนวนกลุ่มตัวอย่างเพิ่มสูงขึ้น เราจะยิ่งได้ค่าการประมาณพารามิเตอร์ ที่เข้าใกล้ค่าจริงมากยิ่งขึ้น นอกจากนี้ การประมาณจากกลุ่มตัวอย่างหลายๆ กลุ่มก็ควรมีผลการประมาณที่ใกล้เคียงกัน เช่น ต้องการศึกษาพฤติกรรมของการใช้จ่ายของนักศึกษามหาวิทยาลัยเชียงใหม่ กลุ่มตัวอย่างที่เราเก็บต้องเป็นไปอย่างสุ่ม ถ้าเราเก็บ ครั้งที่ 1 จนถึงครั้งที่n เราจะได้ผลการประมาณ ผลการประมาณในแต่ละครั้งไม่ควรต่างกัน และยิ่งเก็บข้อมูลเยอะขึ้น ผลการประมาณจะต้องเข้าใกล้ค่าจริง
Multiple RegressionAnalysis: OLS Asymptotics ถ้า x และ u ไม่มีความสัมพันธ์กัน Covจะเป็น 0 ดังนั้นค่า ไม่ bias และ consistency • Theorem 5.1 (Consistency of OLS) • ความหมายของ consistency ในด้านอื่น ๆ • Assumption MLR.4‘
Multiple RegressionAnalysis: OLS Asymptotics True model Misspecified model Bias ตัวอย่างที่ไม่ consistency Asymptotic analog of omitted variable bias
Multiple RegressionAnalysis: OLS Asymptotics The valueoftheexplanatory variable must containnoinformationaboutthevariabilityoftheunobservedfactors • Variances of the OLS estimators • ขึ้นอยู่กับจำนวนกลุ่มตัวอย่างว่ามีมากแค่ไหน • ระยะหว่างค่าประมาณกับกลุ่มประชากรจริง (Sampling variability) • Sampling variability คำนวณโดย • Assumption MLR.5 (Homoskedasticity)
Multiple RegressionAnalysis: OLS Asymptotics Under assumptions MLR.1 – MLR.5: Theorem 2.2 (Variances of the OLS estimators)
Multiple RegressionAnalysis: OLS Asymptotics ค่าความคาดเคลื่อนจะต้องไม่สัมพันธ์กับ x เราสามารถประมาณค่าความแปรปรวนของค่าความคาดเคลื่อนได้ดั้งนี้ และสามารถคำนวณหาค่าความแปรปรวนของความคาดเคลื่อนที่ขจัดค่า bias ได้ดังนี้ โดยกลุ่มตัวอย่าง (n) จะถูกลบด้วย จำนวนพารามิเตอร์ (k) ในแบบจำลอง • Estimating the error variance
Multiple RegressionAnalysis: OLS Asymptotics Plug in for theunknown “standard errors”คือ standard deviation นั่นเอง ซึ่งเราจะเอาไว้วัดว่าค่าพารามิเตอร์ที่เราประมาณมาได้มีความแม่นยำมากเพียงใด Theorem 2.3 (Unbiasedness of the error variance) การคำนวณ standard errorsของ parameter
Multiple RegressionAnalysis: OLS Asymptotics shrinks with the rate shrinks with the rate Useonlythefirst half ofobservations Asymptotic analysis of the OLS sampling errors (cont.) This is why large samples are better Example: Standard errors in a birth weight equation