search for: fnc

Displaying 20 results from an estimated 73 matches for "fnc".

Did you mean: func
2012 Aug 29
5
Extracting the name of a function (inverse of match.fun("myFun"))
Hi all, is there a way to extract the name of a function, i.e. do the reverse of match.fun applied to a character string? I would like to print out the name of a function supplied to another function as an argument. For example: myFunc = function(x) { x+1 } applyFunc = function(fnc, x) { fnc = match.fun(fnc) fnc(x) } Is there a way to obtain "myFunc" from the argument fnc in applyFnc the following call is issued? applyFnc(myFunc, 1) Thanks, Peter
2013 Oct 17
1
pamer.fnc y la nueva versión de R
Hola buenas noches, tengo un problema bastante gordo. ¿A alguno le ha dejado de funcionar las funciones pamer.fnc y mcp.fnc con la nueva versión de R? La semana pasada formatee el ordenador y ahora scripts antiguos no funcionan. La cuestión es que me precupa que no funcione el ejemplo de tutorial del autor. Os dejo un script que debería de funcionar y no lo hace #----------------------------------------------...
2008 Nov 26
1
Problem with aovlmer.fnc in languageR
Dear R list, I have a recurring problem with the languageR package, specifically the aovlmer.fnc function. When I try to run the following code (from R. H. Baayen's textbook): # Example 1: library(languageR) latinsquare.lmer <- lmer(RT ~ SOA + (1 | Word) + (1 | Subject), data = latinsquare) x <- pvals.fnc(latinsquare.lmer,...
2011 Apr 21
1
Error running pvals.fnc in R version 2.13.0
Dear R-help: I've been trying to run pvals.fnc in the newest version of R (2.13.0). The function lmer worked fine, but when I tried to use pvals.fnc on the lmer object, I got the following error: "Error in pvals.fnc(elogr.subj.dys.sum.3x3.p, nsim = 10000) : trying to get slot "coefs" from an object (class "summaryDefault&...
2008 Oct 01
1
pvals.fnc in lme4 and languageR
Hi everybody! I was using the function pvals.fnc from package 'languageR' until April. I do not know which version. Yesterday I updated all my packages and tried to run my loop again. Now I get the following error message: error in pvals.fnc(mm, nsim = 1000) : MCMC sampling is not yet implemented in lme4_0.999375-27 for models with rand...
2007 Aug 21
0
pvals.fnc unhappy about lmer objects
...he examples in Baayen, Davidson, Bates (2006), my plan is to run mcmcsamp on a random effect model created by lmer in package lme4, then use the (perhaps outdated) pvals to estimate p-value. But then I couldn't find pvals anywhere. So question number one is : Has pvals been replaced? by pvals.fnc in the package languageR perhaps? >From the help page, it's stated that pvals.fnc takes a model fitted with lmer, in contrast with the pvals I've read about in Baayen et al, which takes an mcmc object. So I then tried, hr.lmer = lmer(hr ~ tg + spl + (1+tg|M), data=dat) pvals.fnc(hr.l...
2007 Jun 25
1
LanguageR pvals.fnc error message
Hi. I get an error message about not converging when I try and use the pvals.fnc from the languageR library. The LMER analysis worked fine (See below). I am not an expert so I don't understand why the LMER worked but not the pvals.fnc Any help gratefully received. - Mike AIC BIC logLik MLdeviance REMLdeviance -7324 -7254 3673 -7451 -7346 Random eff...
2010 Apr 01
3
pvals.fnc() with language R does not work with R 2.10.1
Hi Everyone, I am using R 2.10.1. lmer function works properly, however pvals.fnc () does not despite the fact that I uploaded: - library(lme4) - library(coda) - library(languageR) This is the error message I get pvals.fnc(lexdec3.lmerE2, nsim=10000)$fixed Error in pvals.fnc(lexdec3.lmerE2, nsim = 10000) : MCMC sampling is not yet implemented in lme4_0.999375 for m...
2009 Apr 22
1
plot.logistic.fit.fnc
Hello, I can not get the function plot.logistic.fit.fnc() working....it returns "Error: could not find function "plot.logistic.fit.fnc"". Do I need to upload as specific package first? I am trying to check the fit of a mixed logistic model. Also, any advice for checking the assumption of independence in a mixed logistic model?...
2007 May 11
0
incorrect MCMC CIs in pvals.fnc (languageR) ?
library(lme4) library(coda) library(languageR) fit = lmer(Reaction~Days + (1|Subject) + (0+Days|Subject), data=sleepstudy) pvals.fnc(fit)$random # compare with... samp = mcmcsamp(fit, n=10000, trans=FALSE) HPDinterval(samp) densityplot(samp, plot=F) # 'pvals.fnc' reports sigma instead of sigma^2, but it looks like the # Sbjc.(In) and Sbjc.Days are also sqrt compared with the corresponding # results from HPDinterval an...
2002 Aug 23
0
nls question
...rst, smooth the data with modreg's smooth.spline. Use this smoothed curve to make an initial estimate of the peak position, height and width. Next, use the smoothed data below the peak to calculate initial values for the quadratic background. Finally, fit the spectrum like this: back.ground.fnc <- function( E, a0, a1, a2 ) { result <- a0 + a1*E + a2*E*E return(result) } spectrum.fnc <- function(E, n0, x0, s, a0, a1, a2 ) { back.ground <- back.ground.fnc( E, a0, a1, a2 ) ## Make sure the background is non-negative: back.ground <- back.ground * (back.ground > 0)...
2010 Feb 20
0
plot.logistic.fit.fnc
Hello All, I am learning mixed effects logistic regression (lmer in lme4), and I am having problems deciphering the goodness of fit function plot.logistic.fit.fnc (languageR package). The only information I can find is that this function plots observed proportions against mean predicted probabilities for some binning of the data. I have explored this function with several datasets, and have had some problems. The resultant plots (for example from the bacter...
2013 Jan 23
0
Mixed effects para factores y no para covariables. Guia y dudas
...are$SoaWord <- factor(paste(latinsquare$SOA, latinsquare$Word)) modI <- lmer(formula= RT ~ SoaWord +(1|Subject), data=latinsquare) #--------------------------------------------------------------------------------------------------------- # Manera más complicada languageR. mcmc <- pvals.fnc(mod, nsim=1000, withMCMC=TRUE) aovlmer.fnc(mod, mcmc= mcmc$mcmc, which=c("SOAmedium", "SOAshort")) aovlmer.fnc(mod, mcmc= mcmc$mcmc, which=c("WordW10", "WordW11", "WordW12", "WordW2" , "WordW3" , "WordW4", "WordW...
2010 Apr 25
1
function pointer question
Hello, I have the following function that receives a "function pointer" formal parameter name "fnc": loocv <- function(data, fnc) { n <- length(data.x) score <- 0 for (i in 1:n) { x_i <- data.x[-i] y_i <- data.y[-i] yhat <- fnc(x=x_i,y=y_i) score <- score + (y_i - yhat)^2 } score <- score/n return(score) } I...
2013 Oct 18
0
pamer.fnc y la nueva versión de R
...0/18 Javier Villacampa González <javier.villacampa.gonzalez@gmail.com> > Hola buenas. > al final corri el siguiente código en mi máquina de casa. El problema es > que ha habido algún cambio en la librería lme4, que hace incompatible los > nuevos objetos lmer con la funcioón pamer.fnc. En este tipo de situaciones > imagino que lo propio sería ponerme en contacto con el autor o intentar > corregir yo mismo el código o incluso ambas. ¿Es decortes escribir al > autor reportandole el fallo? ¿ Existe algún problema protocolo para hacer > esto? (aparte de ponerme en conta...
2013 Dec 02
1
pamer.fnc y la nueva versión de R
Hace unos meses os escribir para comunicaros que había un fallo en esta función. Como os prometí os comento la respuesta por si alguno está interesado en utilizar el paquete LMERconvenientsfucntions Dear Javier, The package has been updated and should work for you fine now. Note that function mcp.fnc does not return the fourth plot (dffits) anymore. We still have to figure out a way to compute the dffits for the new merMod objects. Also note that mcposthoc.fnc doesn't work with pvals.fnc / MCMC anymore. Please see Note in help page. Finally, the package gained function plotLMER.fnc from a...
2013 Oct 20
1
Call parking issue with Cisco SPA phone
I'm trying to implement call parking with asterisk and Cisco SPA504G phones: features.conf parkext => 700 parkpos => 701-702 context => parkedcalls I defined one of the unused keys to park the calls: Key2: fnc=sd;ext=700 at 10.0.1.103;vid=1;nme=Park I also defined two other keys to pickup/unpark the calls: Key3: fnc=blf+sd+cp;sub=701 at 10.0.1.103 Key4: fnc=blf+sd+cp;sub=702 at 10.0.1.103 Parking using these works smoothly. I answer the incoming call, press Key2 to park the call. Call is parked, Key3...
2013 Oct 18
3
pamer.fnc y la nueva versión de R
Hola buenas. al final corri el siguiente código en mi máquina de casa. El problema es que ha habido algún cambio en la librería lme4, que hace incompatible los nuevos objetos lmer con la funcioón pamer.fnc. En este tipo de situaciones imagino que lo propio sería ponerme en contacto con el autor o intentar corregir yo mismo el código o incluso ambas. ¿Es decortes escribir al autor reportandole el fallo? ¿ Existe algún problema protocolo para hacer esto? (aparte de ponerme en contacto a traves del mai...
2009 Sep 19
3
Creating histograms from factors using a for loop
...the following: a <- rep(c("a", "b"), c(6,6)) df <- data.frame(f=a, d=rnorm(12)) df # I am trying to write a 'for' loop which will produce a jpeg histogram for each factor. I can individually isolate the data from a factor and produce a jpeg histogram like so: fnc <- function(x){ x <- df[df$f=="a", "d"] } y <- fnc(df[df$f=="a", "d"]) jpeg(filename="foo.jpeg") hist(y) dev.off() # I'm having trouble creating a loop repeating the process for all the other factors. The following is the b...
2003 Oct 09
1
Scoping rules
...he source of my difficulty, but cannot work out the solution. For the purposes of illustration. I have three functions as defined below: fnA <- function(my.x) { list(first=as.character(substitute(my.x)), second=sqrt(my.x)) } fnB <- function(AA) { tmp.x <- get(AA$first) tmp.x^2 } fnC <- function() { x <- 1:2 y <- fnA(x) z <- fnB(y) c(x,y,z) } fnA() has a vector as an argument and returns the name of the vector and the square root of its elements in a list. fn(B) takes the result of fn(A) as its argument, gets the appropriate vector and computes the square...