June 2018 Update
This commit is contained in:
parent
ba8067c3b7
commit
22f33d4004
5278 changed files with 84726 additions and 14379 deletions
|
|
@ -0,0 +1,7 @@
|
|||
clear
|
||||
set seed 17760704
|
||||
set obs 200
|
||||
forv i=1/4 {
|
||||
gen x`i'=rnormal()
|
||||
}
|
||||
gen y=1.5+0.8*x1-0.7*x2+1.1*x3-1.7*x4+rnormal()
|
||||
|
|
@ -0,0 +1 @@
|
|||
reg y x*
|
||||
11
Task/Multiple-regression/Stata/multiple-regression-3.stata
Normal file
11
Task/Multiple-regression/Stata/multiple-regression-3.stata
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
. di _b[x1]
|
||||
.75252466
|
||||
|
||||
. di _b[_cons]
|
||||
1.3991314
|
||||
|
||||
. di _se[x1]
|
||||
.06895593
|
||||
|
||||
. di _se[_cons]
|
||||
.06978623
|
||||
25
Task/Multiple-regression/Stata/multiple-regression-4.stata
Normal file
25
Task/Multiple-regression/Stata/multiple-regression-4.stata
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
. estat ic
|
||||
|
||||
Akaike's information criterion and Bayesian information criterion
|
||||
|
||||
-----------------------------------------------------------------------------
|
||||
Model | Obs ll(null) ll(model) df AIC BIC
|
||||
-------------+---------------------------------------------------------------
|
||||
. | 200 -487.1455 -275.6985 5 561.397 577.8886
|
||||
-----------------------------------------------------------------------------
|
||||
Note: N=Obs used in calculating BIC; see [R] BIC note.
|
||||
|
||||
. estat vce
|
||||
|
||||
Covariance matrix of coefficients of regress model
|
||||
|
||||
e(V) | x1 x2 x3 x4 _cons
|
||||
-------------+------------------------------------------------------------
|
||||
x1 | .00475492
|
||||
x2 | -.00040258 .00486445
|
||||
x3 | -.00042516 .00017355 .00521125
|
||||
x4 | -.00011915 -.0002568 .00054646 .00386583
|
||||
_cons | .00030777 -.00031109 -.00023794 .00058926 .00487012
|
||||
|
||||
. predict yhat, xb
|
||||
. predict r, r
|
||||
Loading…
Add table
Add a link
Reference in a new issue