[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: setting e(sample) manually

From   "Richard Boylan" <>
Subject   st: setting e(sample) manually
Date   Tue, 14 Aug 2007 10:54:49 -0500

I was interested in setting e(sample) manually in a program. Does
anyone have any suggestion?

I saw a prior post on this issue, and they suggested just removing
from the dataset all the observations that are not in e(sample).  In
my context this is not all that practical.

I am including my program below (with e(sample)) below.


capture program drop panova
program define panova, rclass
version 9.0
syntax varname [if] [, NONOPTION]
marksample touse
capture drop jdrug
egen jdrug = mean(drug) if `touse', by(jud)
sum jdrug if obs2 == 1 & `touse', detail
return scalar x = r(p75)-r(p25)

permute drug "panova" r(x), reps(100) strata(id3) saving(permanova)
*   For searches and help try:

© Copyright 1996–2017 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index