Hello,

I have a vector of coefficients from backward selection model that looks
like:

             [,1]
(Intercept) -0.15
s1[, 1]      2.65
s1[, 2]      1.81
s1[, 5]      2.35


I'd like to get a new vector that contains zeroes for variables that were
not included in the final model. For example here it suppose to be:

             [,1]
(Intercept) -0.15
s1[, 1]      2.65
s1[, 2]      1.81
s1[, 3]      0
s1[, 4]      0
s1[, 5]      2.35

s1[, 6]      0

s1[, 7]      0

s1[, 8]      0


Is there simple function I can use to get such result?
Regards,
Ariel


-- 
*I like to pretend I'm alone*. *Completely alone*. *Maybe post-apocalypse
or plague*... *Whatever*. *No-one left to act normal for. No need to hide
who I really am. It would be... freeing*. *...*

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to