0% found this document useful (0 votes)
90 views7 pages

Adoption

This document contains the log of a Stata session that: 1) Loads and describes a dataset containing adoption data for variables like age, education, output for 120 observations. 2) Runs a logit model to predict adoption based on the variables and finds education level is significant. 3) Estimates average marginal effects and finds education increases probability of adoption. 4) Runs a tobit model to predict adoption intensity between 0-2, finding education and credit amount are significant predictors.

Uploaded by

datateam
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
90 views7 pages

Adoption

This document contains the log of a Stata session that: 1) Loads and describes a dataset containing adoption data for variables like age, education, output for 120 observations. 2) Runs a logit model to predict adoption based on the variables and finds education level is significant. 3) Estimates average marginal effects and finds education increases probability of adoption. 4) Runs a tobit model to predict adoption intensity between 0-2, finding education and credit amount are significant predictors.

Uploaded by

datateam
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 7

-----------------------------------------------------------------------------------

--------------------------
name: <unnamed>
log: C:\data\limiteddependent.txt
log type: text
opened on: 3 Jan 2018, 19:24:08

.
end of do-file

. do "C:\Users\User\AppData\Local\Temp\STD07000000.tmp"

. use "C:\data\dac_student2.dta", clear

.
end of do-file

. do "C:\Users\User\AppData\Local\Temp\STD07000000.tmp"

. global y1list Adpotion

. global y2list AdoptionIntensity

. global y3list RateofAdoption

. global xlist Age MStatus HholdSize NoWives LevelEduc ExperiancedInyears


YrsINAssoc VisitExtentWork CreditAm
> ount2 TotalOutput TotalAvailableLabour TechnoAttribute

.
.
end of do-file

. do "C:\Users\User\AppData\Local\Temp\STD07000000.tmp"

. describe $y1list $y2list $y3list $xlist

storage display value


variable name type format label variable label
-----------------------------------------------------------------------------------
--------------------------
Adpotion byte %10.0g Adpotion
AdoptionInten~y double %10.0g AdoptionIntensity
RateofAdoption double %10.0g RateofAdoption
Age byte %10.0g Age
MStatus byte %10.0g M-Status
HholdSize byte %10.0g Hhold Size
NoWives byte %10.0g NoWives
LevelEduc byte %10.0g LevelEduc
ExperiancedIn~s byte %10.0g ExperiancedInyears
YrsINAssoc byte %10.0g YrsINAssoc
VisitExtentWork byte %10.0g VisitExtentWork
CreditAmount2 long %10.0g CreditAmount 2
TotalOutput double %10.0g TotalOutput
TotalAvailabl~r double %10.0g TotalAvailableLabour
TechnoAttribute byte %10.0g TechnoAttribute

. summarize $$y1list $y2list $y3list $xlist


Variable | Obs Mean Std. Dev. Min Max
-------------+---------------------------------------------------------
AdoptionIn~y | 120 .9040326 .4805995 .2 2
RateofAdop~n | 120 51.2037 34.96759 0 100
Age | 120 37.48333 7.1854 21 52
MStatus | 120 1.75 .4348283 1 2
HholdSize | 120 9.858333 6.032539 2 33
-------------+---------------------------------------------------------
NoWives | 120 1.366667 .5640986 1 3
LevelEduc | 120 3.608333 1.285314 1 5
Experiance~s | 120 15.00833 5.249243 1 30
YrsINAssoc | 120 4.041667 1.871484 1 15
VisitExten~k | 120 .5 .5020964 0 1
-------------+---------------------------------------------------------
CreditAmou~2 | 120 27875 70186.7 0 300000
TotalOutput | 120 3933.028 2602.084 900 13725
TotalAvail~r | 120 24.23417 35.93604 0 126
TechnoAttr~e | 120 2.225 1.937956 0 5

.
end of do-file

. do "C:\Users\User\AppData\Local\Temp\STD07000000.tmp"

. logit $y1list $xlist

Iteration 0: log likelihood = -77.056174


Iteration 1: log likelihood = -31.375313
Iteration 2: log likelihood = -28.618812
Iteration 3: log likelihood = -28.197665
Iteration 4: log likelihood = -28.183157
Iteration 5: log likelihood = -28.183115
Iteration 6: log likelihood = -28.183115

Logistic regression Number of obs = 120


LR chi2(12) = 97.75
Prob > chi2 = 0.0000
Log likelihood = -28.183115 Pseudo R2 = 0.6343

-----------------------------------------------------------------------------------
---
Adpotion | Coef. Std. Err. z P>|z| [95% Conf.
Interval]
---------------------
+----------------------------------------------------------------
Age | .026162 .0586612 0.45 0.656 -.0888118 .
1411357
MStatus | -.9476602 .8887122 -1.07 0.286 -2.689504 .
7941837
HholdSize | .003692 .1257602 0.03 0.977 -.2427935 .
2501775
NoWives | .4796942 1.177975 0.41 0.684 -1.829094
2.788482
LevelEduc | 2.650716 .6423309 4.13 0.000 1.391771
3.909662
ExperiancedInyears | -.018535 .0957845 -0.19 0.847 -.2062693 .
1691992
YrsINAssoc | -.2954306 .1947259 -1.52 0.129 -.6770862 .
0862251
VisitExtentWork | 1.968411 .9447284 2.08 0.037 .1167772
3.820045
CreditAmount2 | .0000175 .0000124 1.41 0.158 -6.78e-06 .
0000418
TotalOutput | .0002479 .0001995 1.24 0.214 -.0001431 .
0006389
TotalAvailableLabour | -.0091695 .0107523 -0.85 0.394 -.0302436 .
0119047
TechnoAttribute | -.6343236 .2657001 -2.39 0.017 -1.155086
-.1135611
_cons | -7.338292 3.28479 -2.23 0.025 -13.77636
-.9002227
-----------------------------------------------------------------------------------
---

.
end of do-file

. do "C:\Users\User\AppData\Local\Temp\STD07000000.tmp"

. margins, dydx (*)

Average marginal effects Number of obs = 120


Model VCE : OIM

Expression : Pr(Adpotion), predict()


dy/dx w.r.t. : Age MStatus HholdSize NoWives LevelEduc ExperiancedInyears
YrsINAssoc VisitExtentWork
CreditAmount2 TotalOutput TotalAvailableLabour TechnoAttribute

-----------------------------------------------------------------------------------
---
| Delta-method
| dy/dx Std. Err. z P>|z| [95% Conf.
Interval]
---------------------
+----------------------------------------------------------------
Age | .0019227 .0042962 0.45 0.654 -.0064978 .
0103432
MStatus | -.0696456 .0640041 -1.09 0.277 -.1950913 .
0558001
HholdSize | .0002713 .0092437 0.03 0.977 -.0178461 .
0183887
NoWives | .0352538 .086247 0.41 0.683 -.1337872 .
2042948
LevelEduc | .1948069 .028004 6.96 0.000 .1399201 .
2496937
ExperiancedInyears | -.0013622 .0070397 -0.19 0.847 -.0151597 .
0124353
YrsINAssoc | -.0217118 .0138679 -1.57 0.117 -.0488924 .
0054687
VisitExtentWork | .1446628 .0649413 2.23 0.026 .0173803 .
2719454
CreditAmount2 | 1.29e-06 8.82e-07 1.46 0.144 -4.41e-07
3.02e-06
TotalOutput | .0000182 .0000141 1.29 0.197 -9.44e-06 .
0000459
TotalAvailableLabour | -.0006739 .0007848 -0.86 0.391 -.002212 .
0008642
TechnoAttribute | -.0466178 .0172747 -2.70 0.007 -.0804756
-.01276
-----------------------------------------------------------------------------------
---

.
end of do-file

. do "C:\Users\User\AppData\Local\Temp\STD07000000.tmp"

. tobit $y2list $xlist, ll(0)

Tobit regression Number of obs = 120


LR chi2(12) = 84.06
Prob > chi2 = 0.0000
Log likelihood = -39.811871 Pseudo R2 = 0.5136

-----------------------------------------------------------------------------------
---
AdoptionIntensity | Coef. Std. Err. t P>|t| [95% Conf.
Interval]
---------------------
+----------------------------------------------------------------
Age | -.0057822 .0050975 -1.13 0.259 -.0158864 .
004322
MStatus | -.2321947 .0738603 -3.14 0.002 -.3785986
-.0857907
HholdSize | .0116259 .0112934 1.03 0.306 -.0107595 .
0340113
NoWives | .0385707 .1112594 0.35 0.730 -.1819647 .
2591061
LevelEduc | .1108583 .0268209 4.13 0.000 .0576946 .
1640221
ExperiancedInyears | -.0114796 .0078701 -1.46 0.148 -.0270795 .
0041203
YrsINAssoc | -.0145572 .0181973 -0.80 0.425 -.0506275 .
021513
VisitExtentWork | .0929654 .0685032 1.36 0.178 -.0428198 .
2287507
CreditAmount2 | 9.68e-07 4.63e-07 2.09 0.039 4.96e-08
1.89e-06
TotalOutput | 8.30e-06 .000013 0.64 0.524 -.0000174 .
000034
TotalAvailableLabour | .0002305 .0010121 0.23 0.820 -.0017757 .
0022368
TechnoAttribute | -.1042785 .0196239 -5.31 0.000 -.1431765
-.0653805
_cons | 1.311221 .2670248 4.91 0.000 .7819321
1.840511
---------------------
+----------------------------------------------------------------
/sigma | .3371683 .0217639 .2940286 .
3803081
-----------------------------------------------------------------------------------
---
0 left-censored observations
120 uncensored observations
0 right-censored observations
.
end of do-file

. do "C:\Users\User\AppData\Local\Temp\STD07000000.tmp"

. generate dy = $y2list >0

.
end of do-file

. do "C:\Users\User\AppData\Local\Temp\STD07000000.tmp"

. margins, dydx(*) atmeans predict (e)


option e incorrectly specified
r(198);

end of do-file

r(198);

. do "C:\Users\User\AppData\Local\Temp\STD07000000.tmp"

. tobit $y2list $xlist, ll(0) ul(10000)

Tobit regression Number of obs = 120


LR chi2(12) = 84.06
Prob > chi2 = 0.0000
Log likelihood = -39.811871 Pseudo R2 = 0.5136

-----------------------------------------------------------------------------------
---
AdoptionIntensity | Coef. Std. Err. t P>|t| [95% Conf.
Interval]
---------------------
+----------------------------------------------------------------
Age | -.0057822 .0050975 -1.13 0.259 -.0158864 .
004322
MStatus | -.2321947 .0738603 -3.14 0.002 -.3785986
-.0857907
HholdSize | .0116259 .0112934 1.03 0.306 -.0107595 .
0340113
NoWives | .0385707 .1112594 0.35 0.730 -.1819647 .
2591061
LevelEduc | .1108583 .0268209 4.13 0.000 .0576946 .
1640221
ExperiancedInyears | -.0114796 .0078701 -1.46 0.148 -.0270795 .
0041203
YrsINAssoc | -.0145572 .0181973 -0.80 0.425 -.0506275 .
021513
VisitExtentWork | .0929654 .0685032 1.36 0.178 -.0428198 .
2287507
CreditAmount2 | 9.68e-07 4.63e-07 2.09 0.039 4.96e-08
1.89e-06
TotalOutput | 8.30e-06 .000013 0.64 0.524 -.0000174 .
000034
TotalAvailableLabour | .0002305 .0010121 0.23 0.820 -.0017757 .
0022368
TechnoAttribute | -.1042785 .0196239 -5.31 0.000 -.1431765
-.0653805
_cons | 1.311221 .2670248 4.91 0.000 .7819321
1.840511
---------------------
+----------------------------------------------------------------
/sigma | .3371683 .0217639 .2940286 .
3803081
-----------------------------------------------------------------------------------
---
0 left-censored observations
120 uncensored observations
0 right-censored observations

.
end of do-file

. do "C:\Users\User\AppData\Local\Temp\STD07000000.tmp"

. heckman $y2list $xlist, select(dy = $xlist) twostep


Dependent variable never censored because of selection:
model would simplify to OLS regression
r(498);

end of do-file

r(498);

. do "C:\Users\User\AppData\Local\Temp\STD07000000.tmp"

. reg $y3list $xlist

Source | SS df MS Number of obs = 120


-------------+---------------------------------- F(12, 107) = 9.12
Model | 73590.8237 12 6132.56865 Prob > F = 0.0000
Residual | 71914.3203 107 672.096451 R-squared = 0.5058
-------------+---------------------------------- Adj R-squared = 0.4503
Total | 145505.144 119 1222.7323 Root MSE = 25.925

-----------------------------------------------------------------------------------
---
RateofAdoption | Coef. Std. Err. t P>|t| [95% Conf.
Interval]
---------------------
+----------------------------------------------------------------
Age | .4123123 .3919512 1.05 0.295 -.3646852
1.18931
MStatus | -11.30925 5.679134 -1.99 0.049 -22.56747
-.0510333
HholdSize | -.0949261 .8683485 -0.11 0.913 -1.816326
1.626473
NoWives | 6.167468 8.554755 0.72 0.473 -10.79134
23.12627
LevelEduc | 15.53889 2.062268 7.53 0.000 11.45069
19.6271
ExperiancedInyears | -.5042998 .6051325 -0.83 0.406 -1.703904 .
6953049
YrsINAssoc | .0125175 1.399195 0.01 0.993 -2.761224
2.786259
VisitExtentWork | 7.767327 5.267225 1.47 0.143 -2.674332
18.20899
CreditAmount2 | 4.80e-06 .0000356 0.13 0.893 -.0000658 .
0000754
TotalOutput | .0019291 .0009975 1.93 0.056 -.0000484 .
0039066
TotalAvailableLabour | .031238 .077824 0.40 0.689 -.123039 .
185515
TechnoAttribute | -.1933643 1.508887 -0.13 0.898 -3.184556
2.797828
_cons | -12.43564 20.53158 -0.61 0.546 -53.13712
28.26583
-----------------------------------------------------------------------------------
---

.
end of do-file

. do "C:\Users\User\AppData\Local\Temp\STD07000000.tmp"

. log close
name: <unnamed>
log: C:\data\limiteddependent.txt
log type: text
closed on: 3 Jan 2018, 19:27:07
-----------------------------------------------------------------------------------
--------------------------

You might also like