An embedded and charset-unspecified text was scrubbed... Name: not available Url: https://stat.ethz.ch/pipermail/r-help/attachments/20041124/64ca075a/attachment.pl
logistic regression and 3PL model
6 messages · Michael Lau, Jean Coursol, Brian Ripley +2 more
The same is true in french under linux. Something changed from 1.9.1 to 2.0.0. First, it is necessary to have .inputrc (in $HOME) (or $INPUTRC defined) to enter and display 8-bits characters under bash and R. #.inputrc (for readline library) set input-meta on set output-meta on set convert-meta off Then Under R2.0.1, I have:
??l??ment <- "??" # error for object name
Error: syntax error
element <- "??" element
[1] "\351" # different from R1.9.1 (="??")
Sys.setlocale('LC_ALL','fr_FR')
[1] "fr_FR"
??l??ment <- "??" # OK for object name ??l??ment
[1] "??" # OK for display Another solution: export LC_ALL='fr_FR' # before loading R and then Sys.setlocale becomes useless. Jean Coursol
On Thu, 25 Nov 2004, Jean Coursol wrote:
The same is true in french under linux.
No, it is not the same. Windows XP does this even in the Danish locale, and that is a problem (in Windows). Your problem is simply that you should be using a French locale to use French characters. You should not expect French characters to be recognised in a non-French locale, and if they were, that was a bug in R 1.9.1.
Dear Mike, Pinheiro and Bates discuss a three-parameter logistic growth model in their Mixed Effects Models in S and S-PLUS, but as far as I know there's no direct way to fit the 3PL IRT model in R. It should be possible to fit such a model using one of the general optimisers in R, such as nlm() or optimise(), and I think that it would be a nice project to produce an IRT package for R. Regards, John -------------------------------- John Fox Department of Sociology McMaster University Hamilton, Ontario Canada L8S 4M4 905-525-9140x23604 http://socserv.mcmaster.ca/jfox --------------------------------
-----Original Message----- From: r-help-bounces at stat.math.ethz.ch [mailto:r-help-bounces at stat.math.ethz.ch] On Behalf Of Michael Lau Sent: Wednesday, November 24, 2004 10:26 PM To: r-help at stat.math.ethz.ch Subject: [R] logistic regression and 3PL model Hello colleagues, I am a novice with R and am stuck with an analysis I am trying to conduct. Any suggestions or feedback would be very much appreciated. I am analyzing a data set of psi (ESP) ganzfeld trials. The response variable is binary (correct/incorrect), with a 25% base rate. I've looked around the documentation and other online resources and cannot find how I can correct for that base rate when I conduct a logistic regression. I understand that the correction would be equivalent to the three parameter logistic model (3PL) in IRT but am unsure how to best fit it from a logistic regression in R. Thanks much, Mike Lau
__________________________________ Michael Y. Lau, M.A. 118 Haggar Hall Department of Psychology University of Notre Dame Notre Dame, IN 46556 [[alternative HTML version deleted]] ______________________________________________ R-help at 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
On Thu, 25 Nov 2004, John Fox wrote:
Pinheiro and Bates discuss a three-parameter logistic growth model in their Mixed Effects Models in S and S-PLUS, but as far as I know there's no direct way to fit the 3PL IRT model in R. It should be possible to fit such a model using one of the general optimisers in R, such as nlm() or optimise(), and I
optim(), not optimize() as there are at least two free parameters, I believe.
think that it would be a nice project to produce an IRT package for R.
As I understand it this is a logistic regression and not a logistic growth curve, the latter being fitted by least squares. For a known baseline (which is thus a 2-free PL model but what seems asked for here), a glm family can be constructed to allow glm() to do the fitting. This is model described at http://work.psych.uiuc.edu/irt/modeling_dich1.asp with c known to be 0.25. It would certainly be worth having an implementation of that in R, with c=0.5 being the most common case. It is quite straightforward to fit such models by direct optimization of the likelihood, and MASS4 p. 445 gives you a template for logistic regression that could easily be modified.
-----Original Message----- To: r-help at stat.math.ethz.ch Subject: [R] logistic regression and 3PL model Hello colleagues, I am a novice with R and am stuck with an analysis I am trying to conduct. Any suggestions or feedback would be very much appreciated. I am analyzing a data set of psi (ESP) ganzfeld trials. The response variable is binary (correct/incorrect), with a 25% base rate. I've looked around the documentation and other online resources and cannot find how I can correct for that base rate when I conduct a logistic regression. I understand that the correction would be equivalent to the three parameter logistic model (3PL) in IRT but am unsure how to best fit it from a logistic regression in R.
Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595
I don't know if I am missing something, but isn't there also a latent variable (trait) that must be integrated out using maybe Gauss-Hermite which might complicate a bit the calculations? So is this possible with `glm()'? Best, Dimitris ---- Dimitris Rizopoulos Ph.D. Student Biostatistical Centre School of Public Health Catholic University of Leuven Address: Kapucijnenvoer 35, Leuven, Belgium Tel: +32/16/336899 Fax: +32/16/337015 Web: http://www.med.kuleuven.ac.be/biostat http://www.student.kuleuven.ac.be/~m0390867/dimitris.htm ----- Original Message ----- From: "Prof Brian Ripley" <ripley at stats.ox.ac.uk> To: "John Fox" <jfox at mcmaster.ca> Cc: <r-help at stat.math.ethz.ch> Sent: Thursday, November 25, 2004 5:13 PM Subject: RE: [R] logistic regression and 3PL model
On Thu, 25 Nov 2004, John Fox wrote:
Pinheiro and Bates discuss a three-parameter logistic growth model in their Mixed Effects Models in S and S-PLUS, but as far as I know there's no direct way to fit the 3PL IRT model in R. It should be possible to fit such a model using one of the general optimisers in R, such as nlm() or optimise(), and I
optim(), not optimize() as there are at least two free parameters, I believe.
think that it would be a nice project to produce an IRT package for R.
As I understand it this is a logistic regression and not a logistic growth curve, the latter being fitted by least squares. For a known baseline (which is thus a 2-free PL model but what seems asked for here), a glm family can be constructed to allow glm() to do the fitting. This is model described at http://work.psych.uiuc.edu/irt/modeling_dich1.asp with c known to be 0.25. It would certainly be worth having an implementation of that in R, with c=0.5 being the most common case. It is quite straightforward to fit such models by direct optimization of the likelihood, and MASS4 p. 445 gives you a template for logistic regression that could easily be modified.
-----Original Message----- To: r-help at stat.math.ethz.ch Subject: [R] logistic regression and 3PL model Hello colleagues, I am a novice with R and am stuck with an analysis I am trying to conduct. Any suggestions or feedback would be very much appreciated. I am analyzing a data set of psi (ESP) ganzfeld trials. The response variable is binary (correct/incorrect), with a 25% base rate. I've looked around the documentation and other online resources and cannot find how I can correct for that base rate when I conduct a logistic regression. I understand that the correction would be equivalent to the three parameter logistic model (3PL) in IRT but am unsure how to best fit it from a logistic regression in R.
-- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595
______________________________________________ R-help at 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