search for: educc

Displaying 2 results from an estimated 2 matches for "educc".

Did you mean: educ
1999 Nov 25
0
tapply and weighted.mean
I am trying to use tapply to estimate the average wage in a set of Year*Education cells using sampling weights, as well as some other other statistics using the weights). I am having trouble trying to figure out how to pass the weights to the function, using: > tapply(wage,list(Educc,Year),weighted.mean, w=weight) whieh produces warnings of the type: 3: longer object length is not a multiple of shorter object length in: x * w The reason for this became obvious on inspecting the code for tapply. The extra argument 'w=weight' gets passed in its entirety to FUN ('...
2003 Nov 25
3
weighted mean
How do I go about generating a WEIGHTED mean (and standard error) of a variable (e.g., expenditures) for each level of a categorical variable (e.g., geographic region)? I'm looking for something comparable to PROC MEANS in SAS with both a class and weight statement. Thanks. Marc [[alternative HTML version deleted]]