Zelig icon indicating copy to clipboard operation
Zelig copied to clipboard

sim should provide x values

Open izahn opened this issue 8 years ago • 1 comments

Zelig currently labels sim results with "sim x :", which is not very informative.

> m <- zls$new()
> m$zelig(speed ~ dist, data = cars)
> m$setx()
> m$sim()
> m

 sim x :
 -----
ev
     mean       sd      50%    2.5%    97.5%
1 15.3901 0.453249 15.39421 14.5052 16.27451
pv
         mean       sd      50%     2.5%    97.5%
[1,] 15.24771 3.061209 15.22315 9.284201 21.05632

It would be better to enumerate the x values, e.g.,

 sim at disp = 42.98 :
 -----
ev
     mean       sd      50%    2.5%    97.5%
1 15.3901 0.453249 15.39421 14.5052 16.27451
pv
         mean       sd      50%     2.5%    97.5%
[1,] 15.24771 3.061209 15.22315 9.284201 21.05632

Or perhaps

 sim at disp = mean(disp):
 -----
ev
     mean       sd      50%    2.5%    97.5%
1 15.3901 0.453249 15.39421 14.5052 16.27451
pv
         mean       sd      50%     2.5%    97.5%
[1,] 15.24771 3.061209 15.22315 9.284201 21.05632

There could be some heuristic for shortening the list if there are many predictors, but the main thing is to communicate what these values actually are.

izahn avatar Feb 06 '17 15:02 izahn

I like this idea.

It will likely be useful for creating understandable zelig_qi_to_df data frames.

christophergandrud avatar Feb 07 '17 10:02 christophergandrud