Weibull Distribution – How to Fit a Weibull Function in R

rweibull distribution

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.

Best Answer

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.

Related Question