5

I am trying to model some data that follows a sigmoid curve relationship. In my field of work (psychophysics), a Weibull function is usually used to model such relationships, rather than probit.

I am trying to create a model using R. My model will have a 'shape' and 'scale' value. In order to generate this model, I would have thought that R would need to have input vectors from both my X and Y axes (I am plotting size of a visual stimulus against the probability of it being seen). However, the R help page gives details of functions that only require either a vector of quantiles (size of stimulus) or a vector of probabilities (presumably, this means my 'probability of seeing' data).

I don't see how R could possibly fit a model on the grounds of only having half of my data (i.e. using my X axis (quantile) data, but none of my Y axis (probability of seeing) data).

Am I missing something? I'm not a statistician so I fear there's something fundamental that I've overlooked. Any help would be appreciated.

CaptainProg
  • 215
  • 3
  • 14
  • 2
    The confusion here isn't really w/ R, it's w/ the nature of the activity you're trying to do. What you want is to use the cumulative Weibull as a [link function](http://en.wikipedia.org/wiki/Generalized_linear_model#Link_function) to *connect* the size of your visual stimulus to the probability of it being seen. To understand more about link functions, it may help you to read my answer here: [difference-between-logit-and-probit-models](http://stats.stackexchange.com/questions/20523//30909#30909). – gung - Reinstate Monica Feb 07 '13 at 15:33

1 Answers1

5

What you are trying to do (if I understand you correctly), is to model the probability of the stimulus being seen by a Weibull distribution... but with the Weibull parameters depending on a covariate, i.e., the size of the stimulus. So you are really doing a so-called "Weibull regression". The weibreg() function in the eha package looks like it should do what you want.

Stephan Kolassa
  • 95,027
  • 13
  • 197
  • 357