Quantcast
Channel: Statalist
Viewing all articles
Browse latest Browse all 65565

Accessing stored estimation results with nlcom

$
0
0
Is it possible to combine the results from two separate estimation commands using nlcom? I simply wish to multiply a proportion (using svy: proportion) and a mean (using svy: mean). Minimal Working Example provided below:

sysuse auto, clear
set more off

/*Create a weight variable for illustration*/
gen popweight=1
svyset [w=popweight]

/*Find means*/
svy: mean price , over(rep78)
estimates store price

/*Find proportions*/
svy: proportion headroom
estimates store headroom

/*Non-linear combination of Mean and Proportion*/
nlcom ([headroom]_prop_1*[price]_b[1] )

This gives the error "equation [price] not found". Any advice appreciated.

Viewing all articles
Browse latest Browse all 65565

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>