Hi, there
surppose there is a variable, cigs, which show the number of one somke per day, 0 means no smoking. And I want to calculate the mean of
those take cigarrets. How to do that?
Thank you, all
calculating mean
Moderators: EViews Gareth, EViews Jason, EViews Moderator, EViews Matt
-
- Non-normality and collinearity are NOT problems!
- Posts: 3775
- Joined: Wed Sep 17, 2008 2:25 pm
Re: calculating mean
Look at the help system for @mean
Re: calculating mean
startz wrote:Look at the help system for @mean
I read the help, but I have no idea about this, could you show me the right way.
Thank you.
-
- Non-normality and collinearity are NOT problems!
- Posts: 3775
- Joined: Wed Sep 17, 2008 2:25 pm
Re: calculating mean
series y =@mean(cigs)
Re: calculating mean
No, I mean y=@mean(cigs, in which cigs not equal to 0).
Say there are 50 observations in which 30 observations equal 0.
I just want to calculate the mean of the rest 20, and how to do this using a command function.
Thank you.
Say there are 50 observations in which 30 observations equal 0.
I just want to calculate the mean of the rest 20, and how to do this using a command function.
Thank you.
-
- Non-normality and collinearity are NOT problems!
- Posts: 3775
- Joined: Wed Sep 17, 2008 2:25 pm
Re: calculating mean
smpl if cigs>0
series y=@mean(cigs)
or set the smpl and then open cigs and view stats
series y=@mean(cigs)
or set the smpl and then open cigs and view stats
Who is online
Users browsing this forum: No registered users and 28 guests