{ "cells": [ { "cell_type": "code", "execution_count": 1, "id": "8b568631", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "\n", "Call:\n", "lm(formula = lwage ~ educ + exper + tenure, data = wagedata)\n", "\n", "Residuals:\n", " Min 1Q Median 3Q Max \n", "-2.05802 -0.29645 -0.03265 0.28788 1.42809 \n", "\n", "Coefficients:\n", " Estimate Std. Error t value Pr(>|t|) \n", "(Intercept) 0.284360 0.104190 2.729 0.00656 ** \n", "educ 0.092029 0.007330 12.555 < 2e-16 ***\n", "exper 0.004121 0.001723 2.391 0.01714 * \n", "tenure 0.022067 0.003094 7.133 3.29e-12 ***\n", "---\n", "Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1\n", "\n", "Residual standard error: 0.4409 on 522 degrees of freedom\n", "Multiple R-squared: 0.316,\tAdjusted R-squared: 0.3121 \n", "F-statistic: 80.39 on 3 and 522 DF, p-value: < 2.2e-16\n" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "library(haven)\n", "wagedata<-read_dta(\"WAGE1.DTA\")\n", "reg1<-lm(lwage~educ + exper + tenure, data = wagedata)\n", "summary(reg1)" ] }, { "cell_type": "code", "execution_count": 5, "id": "ee74a43a", "metadata": {}, "outputs": [ { "data": { "text/html": [ "
lnchprg | enroll | staff | expend | salary | benefits | droprate | gradrate | math10 | sci11 | totcomp | ltotcomp | lexpend | lenroll | lstaff | bensal | lsalary |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
<dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <dbl> |
1.4 | 1862 | 112.6 | 5765 | 37498 | 7420 | 2.9 | 89.2 | 56.4 | 67.9 | 44918 | 10.71259 | 8.659560 | 7.529407 | 4.723842 | 0.1978772 | 10.53204 |
2.3 | 11355 | 101.2 | 6601 | 48722 | 10370 | 1.3 | 91.4 | 42.7 | 65.3 | 59092 | 10.98685 | 8.794976 | 9.337414 | 4.617099 | 0.2128402 | 10.79389 |
2.7 | 7685 | 114.0 | 6834 | 44541 | 7313 | 3.5 | 91.4 | 43.8 | 54.3 | 51854 | 10.85619 | 8.829665 | 8.947025 | 4.736198 | 0.1641858 | 10.70417 |
3.4 | 1148 | 85.4 | 3586 | 31566 | 5989 | 3.6 | 86.6 | 25.3 | 60.0 | 37555 | 10.53356 | 8.184793 | 7.045776 | 4.447346 | 0.1897295 | 10.35984 |
3.4 | 1572 | 96.1 | 3847 | 29781 | 5545 | 0.0 | 100.0 | 15.3 | 65.8 | 35326 | 10.47237 | 8.255049 | 7.360104 | 4.565389 | 0.1861925 | 10.30163 |
3.4 | 2496 | 101.1 | 5070 | 36801 | 5895 | 2.7 | 89.2 | 46.0 | 60.5 | 42696 | 10.66186 | 8.531096 | 7.822445 | 4.616110 | 0.1601859 | 10.51328 |