[R] repeated measures logistic regression

2013-07-27 Thread Stanislav Aggerwal
I have searched the r-help archive and saw only one unanswered post related to mine. My design is as follows. - y is Bernoulli response - x1 is continuous variable - x2 is categorical (factor) variable with two levels The experiment is completely within subjects. That is, each subject

Re: [R] repeated measures logistic regression

2013-07-28 Thread Stanislav Aggerwal
Thanks very much Ben for your extremely helpful response. I have loads of data so this worked fine. cheers, Stan On Saturday, July 27, 2013, Ben Bolker wrote: Stanislav Aggerwal stan.aggerwal at gmail.com writes: I have searched the r-help archive and saw only one unanswered post

[R] get mouse position without waiting for a click

2013-09-30 Thread Stanislav Aggerwal
Consider the following: par(mar=c(0,0,0,0),xaxs = 'i',yaxs='i') plot.new() for(i in 1:20) { z - matrix(runif(256*256), ncol=256) dev.hold() image(z, col=grey(0:255/255),zlim=c(0,1),useRaster=TRUE) dev.flush() Sys.sleep(.1) } I would like to continuously display the animation until

Re: [R] get mouse position without waiting for a click

2013-09-30 Thread Stanislav Aggerwal
, Stanislav Aggerwal stan.agger...@gmail.com wrote: Consider the following: par(mar=c(0,0,0,0),xaxs = 'i',yaxs='i') plot.new() for(i in 1:20) { z - matrix(runif(256*256), ncol=256) dev.hold() image(z, col=grey(0:255/255),zlim=c(0,1),useRaster=TRUE) dev.flush() Sys.sleep(.1

Re: [R] get mouse position without waiting for a click

2013-09-30 Thread Stanislav Aggerwal
HWidentify, HTKidentify, dynIdentify, and TkIdentify. On Mon, Sep 30, 2013 at 8:46 AM, Stanislav Aggerwal stan.agger...@gmail.com javascript:_e({}, 'cvml', 'stan.agger...@gmail.com'); wrote: Consider the following: par(mar=c(0,0,0,0),xaxs = 'i',yaxs='i') plot.new() for(i in 1:20) { z

[R] using poly() to predict

2015-01-14 Thread Stanislav Aggerwal
This method of finding yhat as x %*% b works when I use raw polynomials: x-1:8 y- 1+ 1*x + .5*x^2 fit-lm(y~poly(x,2,raw=T)) b-coef(fit) xfit-seq(min(x),max(x),length=20) yfit-b[1] + poly(xfit,2,raw=T) %*% b[-1] plot(x,y) lines(xfit,yfit) But it doesn't work when I use orthogonal polynomials:

Re: [R] using poly() to predict

2015-01-15 Thread Stanislav Aggerwal
in C++ to evaluate your polynomials. On Wed, Jan 14, 2015 at 2:38 PM, Prof Brian Ripley rip...@stats.ox.ac.uk wrote: On 14/01/2015 14:20, Stanislav Aggerwal wrote: This method of finding yhat as x %*% b works when I use raw polynomials: x-1:8 y- 1+ 1*x + .5*x^2 fit-lm(y~poly(x,2,raw=T)) b

[R] nonmonotonic glm?

2015-01-11 Thread Stanislav Aggerwal
I have the following problem. DV is binomial p IV is quantitative variable that goes from negative to positive values. The data look like this (need nonproportional font to view): o o o o o o o o

Re: [R] nonmonotonic glm?

2015-01-12 Thread Stanislav Aggerwal
PM, Marc Schwartz marc_schwa...@me.com wrote: On Jan 11, 2015, at 4:00 PM, Ben Bolker bbol...@gmail.com wrote: Stanislav Aggerwal stan.aggerwal at gmail.com writes: I have the following problem. DV is binomial p IV is quantitative variable that goes from negative to positive

[R] glm in hdlm?

2015-03-19 Thread Stanislav Aggerwal
I am following the example in the vignette for hdlm (p. 19), but I cannot get it to to fit a logistic. For those who don't know the package, it allows one to fit high dimensional data where the number of variables may exceed the number of cases. library(hdlm) LMFUN - function(x,y) return(glm(y ~