On Tue, 10 Jun 2014, Artur T. wrote:
Dear all,
I am just using the "omit" command. My initial model has many regressors
and the "omit" command with the "--auto=alpha" option reduces the
specification substantially. I want to find out the index/position of
the variable which is selected as insignificant each round.
So lets say I have three regressors. The initial point estimates are:
binit = { 0.5, 2, 3.4 }
after "omit" the first two regressors are found to be insignificant, and
hence the final estimate is, for instance, given by:
bfinal = { 3.55 }
In this case I would like to have something like a selection vector
which takes unity for the omitted variables:
select = { 1, 1, 0 }
I've got a rather complicated solution in mind but I am wondering
whether there is a built-in command which I am not aware of.
A built-in command? Surely not, much too specialized. But it's easy
enough to do with a function. For example:
<hansl>
function matrix deselected (list L1, list L2)
matrix vd = L1
loop i=1..cols(vd) --quiet
vd[i] = !inlist(L2, L1[i])
endloop
return vd
end function
open data4-10
ols 1 0 2 3 4 5 6
L1 = $xlist
omit --auto=.05
L2 = $xlist
matrix Ldiff = deselected(L1, L2)
print Ldiff
</hansl>
Allin Cottrell