I am trying to calculate mean preschool enrolment in each class, excluding the index child. I am using the command
series meanenrol= @meansby(preschool, t2_id, "@all")
t2_id is the teacher id which identifies the class and this is working fine to give me the average for the class but I want the average for the class excluding the observation child. Does anybody have any idea how I can do this? Thanks in advance.
Calculating mean minus index observation
Moderators: EViews Gareth, EViews Steve, EViews Moderator, EViews Jason
-
startz
- Non-normality and collinearity are NOT problems!
- Posts: 3797
- Joined: Wed Sep 17, 2008 2:25 pm
Re: Calculating mean minus index observation
Code: Select all
series meanenrol= @meansby(preschool, t2_id, "@all") - preschoolRe: Calculating mean minus index observation
Thanks but that didn't work, gave me negative numbers. If it helps preschool is a dummy variable.
-
startz
- Non-normality and collinearity are NOT problems!
- Posts: 3797
- Joined: Wed Sep 17, 2008 2:25 pm
Re: Calculating mean minus index observation
Oops, I misunderstood what you want. Maybe something like
Code: Select all
series meanenrol= (@sumsby(preschool, t2_id, "@all")-preschool)/(@obsby(preschool, t2_id, "@all")-1)Re: Calculating mean minus index observation
Brilliant! That worked perfectly. Thank you so much!
Who is online
Users browsing this forum: No registered users and 2 guests
