search for: klofstad

Displaying 3 results from an estimated 3 matches for "klofstad".

2007 Nov 12
4
how to assign a group mean to individual cases?
...variable g). Ideally, I'd also like to take out each row's value of x before calculating the group mean assigned to that row. I've already tried the aggregate command. That gives me the group means, but does not allow me to assign them to each row in the data set. THANKS! -- Casey A. Klofstad University of Miami Department of Political Science Coral Gables, FL klofstad at gmail.com http://moya.bus.miami.edu/~cklofstad
2007 Nov 13
2
group mean, minus each row's value
...d, and g is the nominal group indicator: w <- ave(x,g) Now I want to calculate the group average, but WITHOUT each row's value of x. Is there an easy way to do this? I'm sure I'm missing something obvious here, but for the life of me I can't figure it out. Thanks! -- Casey A. Klofstad University of Miami Department of Political Science Coral Gables, FL klofstad at gmail.com http://moya.bus.miami.edu/~cklofstad
2009 Sep 14
2
how to recode with an if-type statement
...e variables to create a new item called "distot." Specifically, here is what I want to do: -if numpeers=1, then distot=w9zd9_1 -if numpeers=2, then distot=(w9zd9_1 + w9zd9_2)/2 -if numpeers=3, then distot=(w9zd9_1 + w9zd9_2 + w9zd9_3)/3 Thanks, in advance, for the help! -- Casey A. Klofstad University of Miami Department of Political Science Coral Gables, FL klofstad at gmail.com http://www.as.miami.edu/personal/cklofstad/