Holcombe:fit psychometric functions: Difference between revisions
No edit summary |
|||
Line 1: | Line 1: | ||
{{Template:Holcombe}} | {{Template:Holcombe}} | ||
==most recent method, fitting logit glm with variable lapse rate== | |||
Use glm with probit. I tried robust glm (glmrob) but it doesn't provide a good measure of deviance (error of the fit), so can't compare different goodness of different fits. | |||
[[www.liv.ac.uk/maths/SP/HOME/K_Zychaluk.html modelfree package]] includes routines for fitting with the appropriate linking function to allow for a lapserate and a guessing rate. I have modified this to yield binomfit_limsAlex | |||
==false start== | |||
Malte Kuss hosts the R library PsychoFun on his personal webpage rather than c-ran server. So you must download is package, unzip it, and install it by inside R going to Packages&Data->Package Installer->Local Package Directory->Install, go inside the PsychoFun directory you've unzipped, and click Open. | Malte Kuss hosts the R library PsychoFun on his personal webpage rather than c-ran server. So you must download is package, unzip it, and install it by inside R going to Packages&Data->Package Installer->Local Package Directory->Install, go inside the PsychoFun directory you've unzipped, and click Open. | ||
I needed to constrain width of psychometric function to be quite narrow. Prior I was using followed lognormal distribution. Then if want mode to be say .1, have to feed it a mean parameter of -2.3 because ln(.1) = -2. Unfortunately the PsychoFun code doesn't allow using a negative parameter for that prior, so I had to change the code. To do so, you go into the downloaded version of PsychoFun folder before you install it, where you can find PsychoFun.R in the R subdirectory. I commented out line 56. Then have to reinstall with Package Installer inside R, "Local Package Directory" option, after in my case first deleting original PsychoFun installation in /Library/Frameworks/R.framework/Versions/2.10/Resources/library/ | I needed to constrain width of psychometric function to be quite narrow. Prior I was using followed lognormal distribution. Then if want mode to be say .1, have to feed it a mean parameter of -2.3 because ln(.1) = -2. Unfortunately the PsychoFun code doesn't allow using a negative parameter for that prior, so I had to change the code. To do so, you go into the downloaded version of PsychoFun folder before you install it, where you can find PsychoFun.R in the R subdirectory. I commented out line 56. Then have to reinstall with Package Installer inside R, "Local Package Directory" option, after in my case first deleting original PsychoFun installation in /Library/Frameworks/R.framework/Versions/2.10/Resources/library/ | ||
Line 9: | Line 15: | ||
boot package | boot package | ||
[www.liv.ac.uk/maths/SP/HOME/K_Zychaluk.html modelfree package] | |||
[[www.liv.ac.uk/maths/SP/HOME/K_Zychaluk.html modelfree package]] | |||
boot.ci gives you bootstrapped confidence intervals of various types [explained here http://www.statoo.com/en/publications/bootstrap_scgn_v131.pdf] | boot.ci gives you bootstrapped confidence intervals of various types [explained here http://www.statoo.com/en/publications/bootstrap_scgn_v131.pdf] |
Revision as of 02:20, 2 November 2010
Recent members• Alex Holcombe
|
Projects• Testing Booth Calendar |
|
Technical• Skills Checklist |
Other• Plots,Graphs
|
most recent method, fitting logit glm with variable lapse rate
Use glm with probit. I tried robust glm (glmrob) but it doesn't provide a good measure of deviance (error of the fit), so can't compare different goodness of different fits. www.liv.ac.uk/maths/SP/HOME/K_Zychaluk.html modelfree package includes routines for fitting with the appropriate linking function to allow for a lapserate and a guessing rate. I have modified this to yield binomfit_limsAlex
false start
Malte Kuss hosts the R library PsychoFun on his personal webpage rather than c-ran server. So you must download is package, unzip it, and install it by inside R going to Packages&Data->Package Installer->Local Package Directory->Install, go inside the PsychoFun directory you've unzipped, and click Open. I needed to constrain width of psychometric function to be quite narrow. Prior I was using followed lognormal distribution. Then if want mode to be say .1, have to feed it a mean parameter of -2.3 because ln(.1) = -2. Unfortunately the PsychoFun code doesn't allow using a negative parameter for that prior, so I had to change the code. To do so, you go into the downloaded version of PsychoFun folder before you install it, where you can find PsychoFun.R in the R subdirectory. I commented out line 56. Then have to reinstall with Package Installer inside R, "Local Package Directory" option, after in my case first deleting original PsychoFun installation in /Library/Frameworks/R.framework/Versions/2.10/Resources/library/ Technical Report explains many more terms than JoV article: Acceptance rate:Next sample in chain only accepted if quantity on p.481 of JoV paper is good Kinetic, Potential energy from Hamiltonian algorithm
Alternatively
method 2
boot package
www.liv.ac.uk/maths/SP/HOME/K_Zychaluk.html modelfree package
boot.ci gives you bootstrapped confidence intervals of various types [explained here http://www.statoo.com/en/publications/bootstrap_scgn_v131.pdf]