{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

hw3-spring04-ans - Answers to Homework 3 1 Create variables...

Info icon This preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon
1 Answers to Homework 3 1. Create variables . use home_heating.dta . . tab mode, gen(mode) mode | Freq. Percent Cum. -----------------+----------------------------------- gas central | 900 20.00 20.00 gas room | 900 20.00 40.00 electric central | 900 20.00 60.00 electric room | 900 20.00 80.00 heat pump | 900 20.00 100.00 -----------------+----------------------------------- Total | 4,500 100.00 . . *** use income/1000 for better scaling *** . gen income2=mode2*income/1000 . gen income3=mode3*income/1000 . gen income4=mode4*income/1000 . gen income5=mode5*income/1000 . . gen agehed2=mode2*agehed . gen agehed3=mode3*agehed . gen agehed4=mode4*agehed . gen agehed5=mode5*agehed . . gen rooms2=mode2*rooms . gen rooms3=mode3*rooms . gen rooms4=mode4*rooms . gen rooms5=mode5*rooms . . *** valley is omitted region category *** . gen ncost12=mode2*ncost1 . gen ncost13=mode3*ncost1 . gen ncost14=mode4*ncost1 . gen ncost15=mode5*ncost1 . . gen scost12=mode2*scost1 . gen scost13=mode3*scost1 . gen scost14=mode4*scost1 . gen scost15=mode5*scost1 . . gen mountn2=mode2*mountn . gen mountn3=mode3*mountn . gen mountn4=mode4*mountn . gen mountn5=mode5*mountn
Image of page 1

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
2 a. . clogit choice installcost operatecost, group(id) Iteration 0: log likelihood = -1375.5926 Iteration 1: log likelihood = -1099.2729 Iteration 2: log likelihood = -1095.2486 Iteration 3: log likelihood = -1095.2371 Conditional (fixed-effects) logistic regression Number of obs = 4500 LR chi2(2) = 706.51 Prob > chi2 = 0.0000 Log likelihood = -1095.2371 Pseudo R2 = 0.2439 ------------------------------------------------------------------------------ choice | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- installcost | -.0062319 .0003528 -17.67 0.000 -.0069233 -.0055405 operatecost | -.0045801 .0003222 -14.22 0.000 -.0052115 -.0039487 ------------------------------------------------------------------------------ The greater the installation cost of a particular heating technology, the less likely a homeowner is to choose that technology. The greater the operating cost of a particular heating technology, the less likely a homeowner is to choose that technology. b. A homeowner is willing to pay $0.73 extra in installation costs for a $1 reduction in operating costs. Note, this makes little sense, probably because the model is poorly specified. c. . clogit choice installcost operatecost mode2-mode5, group(id) Iteration 0: log likelihood = -1253.3016 Iteration 1: log likelihood = -1016.7391 Iteration 2: log likelihood = -1008.3214 Iteration 3: log likelihood = -1008.2287 Iteration 4: log likelihood = -1008.2287 Conditional (fixed-effects) logistic regression Number of obs = 4500 LR chi2(6) = 880.53 Prob > chi2 = 0.0000 Log likelihood = -1008.2287 Pseudo R2 = 0.3039 ------------------------------------------------------------------------------ choice | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- installcost | -.0015332 .0006209 -2.47 0.014 -.00275 -.0003163 operatecost | -.0069964 .0015541 -4.50 0.000 -.0100423 -.0039504 mode2 | -1.402716 .1339866 -10.47 0.000 -1.665325 -1.140107 mode3 | -.0521334 .4659888 -0.11 0.911 -.9654546 .8611879 mode4 | .1424576 .4102307 0.35 0.728 -.6615798 .946495 mode5 | -1.710979 .2267421 -7.55 0.000 -2.155386 -1.266573 ------------------------------------------------------------------------------ Now, a homeowner is willing to pay $4.56 extra in installation costs for a $1 reduction in operating costs. This makes more sense.
Image of page 2
3 d. . clogit choice installcost operatecost mode2-mode5 income2-income5 agehed2-agehed5 /* > */ rooms2-rooms5 ncost12-ncost15 scost12-scost15 mountn2-mountn5, group(id) Iteration 0: log likelihood = -1251.1872 Iteration 1: log likelihood = -1004.0167 Iteration 2: log likelihood = -995.05492 Iteration 3: log likelihood = -994.94503 Iteration 4: log likelihood = -994.94501 Conditional (fixed-effects) logistic regression Number of obs = 4500 LR chi2(30) = 907.10 Prob > chi2 = 0.0000 Log likelihood = -994.94501 Pseudo R2 = 0.3131 ------------------------------------------------------------------------------ choice | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- installcost | -.0015138 .0006261 -2.42 0.016 -.002741 -.0002867 operatecost | -.0069541 .0015631 -4.45 0.000 -.0100178 -.0038903 mode2 | -.8404859 .5356613 -1.57 0.117 -1.890363 .2093909 mode3 | -.4448721 .8701583 -0.51 0.609 -2.150351 1.260607 mode4 | 1.212248 .751067 1.61 0.107 -.259816 2.684312 mode5 | -1.186449 .8140238 -1.46 0.145 -2.781906 .4090088 income2 | -.0109971 .0058567 -1.88 0.060 -.0224759 .0004818 income3 | .0006838 .0079135 0.09 0.931 -.0148265 .016194 income4 | -.0031223 .0070938 -0.44 0.660 -.0170258 .0107812 income5 | .0066306 .008943 0.74 0.458 -.0108974 .0241585 agehed2 | .0030531 .007068 0.43 0.666
Image of page 3

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 4
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern