Re: [R] plotting average effects.

2011-10-21 Thread Dennis Murphy
Hi: Your approach to computing the means is not efficient; a better way would be to use the aggregate() function. I would start by combining the grouping variable and the three prediction variables into a data frame. To get the groupwise mean for all three prediction variables, you can use a formu

Re: [R] plotting average effects.

2011-10-21 Thread gradstudent
i will include the data to read if if you so choose. dat <- read.dta("http://quantoid.net/hw1_2011.dta";) model in question: mod99 <- glm(democracy ~ popc100kpc + ngrevpc, data=dat, family=binomial) -- looking for average effects code, with error on mod99. popckpc is coded in 1

Re: [R] plotting average effects.

2011-10-21 Thread Bart Joosen
How about posting a reproducible sample, so that we can see what is going on? Read the posting guide!!! -- View this message in context: http://r.789695.n4.nabble.com/plotting-average-effects-tp3923982p3925324.html Sent from the R help mailing list archive at Nabble.com.

Re: [R] plotting average effects.

2011-10-21 Thread gradstudent
Bart, I apologize. I posted the code I was using in my first comment, to include the error and the plot that is coming up. I was unaware that was not enough. I am not looking for anyone to give me the actual answer to my specific issue, only looking to be pointed in a direction for an online g

Re: [R] plotting average effects.

2011-10-21 Thread gradstudent
Hi Denins, and thanks for your reply. I understand x,y are not lining up. I just don't know how to fix it in the code. There is only a small group of us at my university using R (4 people of which I am one). 2 are not even touching the average effects plot option, however myself and my study pa

Re: [R] plotting average effects.

2011-10-20 Thread poliscigradstudent
let me clarify, i understand what differing x, y lengths mean. i understand the concept of average effects, etc. i just don't understand how one would fix it. thanks. -- View this message in context: http://r.789695.n4.nabble.com/plotting-average-effects-tp3923982p3924003.html Sent from the R h

[R] plotting average effects.

2011-10-20 Thread poliscigradstudent
hi... i am a phd student using r. i am having difficulty plotting average effects. admittedly, i am not really understanding what each of the commands mean so when i get the error i am not sure where the issue is. here is my code... i will include the points at which there are errors > da