I have data that looks like this
input str43 name float(dummyfrequency11 dummyfrequency12 dummyfrequency13 dummyfrequency14 dummyfrequency15)
"Adur District Council" 0 0 . . .
"Allerdale Borough Council" 0 0 . 0 0
"Allerdale Borough Council" 0 0 . 0 0
"Allerdale Borough Council" 0 0 . 0 0
"Allerdale Borough Council" 0 0 . 0 0
"Allerdale Borough Council" 0 0 . 0 0
"Allerdale Borough Council" 0 0 . 0 0
"Allerdale Borough Council" 0 0 . 0 0
"Allerdale Borough Council" 0 0 . 0 0
"Allerdale Borough Council" 0 0 . 0 0
"Allerdale Borough Council" 0 0 . 0 0
"Allerdale Borough Council" 0 0 . 0 0
"Allerdale Borough Council" 0 0 . 0 0
"Amber Valley Borough Council" 1 1 . 1 1
"Amber Valley Borough Council" 1 1 . 1 1
"Amber Valley Borough Council" 1 1 . 1 .
"Amber Valley Borough Council" 1 1 . 1 1
"Amber Valley Borough Council" 1 1 . 1 1
"Amber Valley Borough Council" 1 1 . 1 1
"Amber Valley Borough Council" 1 1 . 1 0
"Amber Valley Borough Council" 1 1 . 1 1
"Amber Valley Borough Council" 1 1 . 1 0
"Amber Valley Borough Council" 1 1 . 1 0
"Amber Valley Borough Council" 1 1 . 1 0
"Amber Valley Borough Council" 1 1 . 1 .
"Amber Valley Borough Council" 1 1 . 1 .
"Amber Valley Borough Council" 1 1 . 1 1
I would like to find the average for each row, however I dont want the average to include the missing values, nor include them in the n on the bottom.
For example the values I want for the bottom 4 columns would be
0.75,1,1, and 1.
Doing this manually would take far too long as I have many more columns of dummies and many more rows.
Any help is greatly appreciated! Thank You.
Related Posts with Calculating an average that doesnt include missing values
Change in a variable when we have pooled cross-sectionsHello, How can we calculate the change in a variable when its values for two consecutive years are …
Drawing a graph with insignificant*coefficient!Hi, Can we draw a graph when some of our regression coefficients show up as insignificant? Specific…
generating DHS indiciatorCan someone guide me how to generate percentage of basic and limited sanitation service for nigeria …
How to write a command for nultiple condition with a character variable?Hi all, in my study, I want to study the subsample without observations from some countries without …
RMSEA 90% CI using Satorra-Bentler in sem CFAI am running a CFA using sem but am having trouble figuring out the output and possibly whether ther…
Subscribe to:
Post Comments (Atom)
0 Response to Calculating an average that doesnt include missing values
Post a Comment