Minyu Chen wrote: > Dear all: > > When I am trying to get the marginal effects: > > summary(result7,adv_inc_ratio=mean(m9201 > $adv_inc_ratio),adv_price_ratio=mean(m9201$adv_price_ratio), ...(SOME > MORE CONTINUOUS AND DISCRETE VARIABLES BUT I AM NOT LISTING)... regW=c > (0,mean(m9201$regW),1), regWM=c(0,mean(m9201$regWM),1)) > > It gave out an error message: > > Error in summary.Design(result7, adv_inc_ratio = mean(m9201 > $adv_inc_ratio), : > ranges not defined here or with datadist for adv_inc_ratio > adv_price_ratio agem1 change2 yr1Libor yr1Libor1mtLag yr1Libor1yrLag > change21yrLag change21mtLag fwdReal4yr fwdInfl4yr > > But I remember from my previous operation a few months ago (I > recorded the commands) that to summary the marginal effect, I don't > have to specify the ranges for the discrete variables. However, I use > the command again (with slight modification because of the newly > added variables) it doesn't work. I don't know what went wrong. > > Thank you very much. > > Thanks, > Minyu Chen
Please read the package's help files especially about the datadist function. Frank -- Frank E Harrell Jr Professor and Chair School of Medicine Department of Biostatistics Vanderbilt University ______________________________________________ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.