Estimado Javier Villacampa Gonzáles

Si una persona se toma el trabajo de desarrollar y compartir, como es el
caso de R, seguramente conoce de problemas que tuvo que decidir mientras
escibía el código, y estará agradecido porque hay gente que utiliza su
aporte, su trabajo no fué a la nada, todo lo contrario.

En mi caso un solo autor tuvo una respuesta negativa para con migo.

Javier Marcuzzi


2013/10/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 contacto a traves del mail de contacto de la
> persona responsable)
>
> Muchas gracias por adelantado.
>
> Aquí les dejo el código simplificado y las informaciones de sesión en la
> que podrán ver distintas versiones de R así como SO.
>
> # ------------------------------
> --------------------------
> # Codigo
> # --------------------------------------------------------
>  require(lme4)
>  require(LMERConvenienceFunctions)
>  dat <- data.frame(row.names= 1:20)
>  dat$Subject <-
>    factor(rep(x= c("S1","S2","S3","S4"), each= 5))
>  dat$RT <- rnorm( 20, mean= 500,sd= 20)
>  dat$Condicion1 <-
>    factor(rep(x= c("A","B"), each= 2))
>  dat$Condicion2 <-
>    factor(rep(x= c("X","Y")))
>  mod <- lmer( RT ~  Condicion1 * Condicion2 + (1|Subject), data=dat)
>  summary(mod)
>
>  pamer.fnc(mod)
>  sessionInfo()
>
> # --------------------------------------------------------
> Con R 3.0.1 NO FUNCIONA
> # ------------------------------
> --------------------------
> >  require(lme4)
> Loading required package: lme4
> Loading required package: lattice
> Loading required package: Matrix
> Mensajes de aviso perdidos
> package ‘lme4’ was built under R version 3.0.2
> >  require(LMERConvenienceFunctions)
> Loading required package: LMERConvenienceFunctions
> Mensajes de aviso perdidos
> package ‘LMERConvenienceFunctions’ was built under R version 3.0.2
> >  dat <- data.frame(row.names= 1:20)
> >  dat$Subject <-
> +   + factor(rep(x= c("S1","S2","S3","S4"), each= 5))
> Mensajes de aviso perdidos
> In Ops.factor(factor(rep(x = c("S1", "S2", "S3", "S4"), each = 5))) :
>   + not meaningful for factors
> >  dat$RT <- rnorm( 20, mean= 500,sd= 20)
> >  dat$Condicion1 <-
> +   + factor(rep(x= c("A","B"), each= 2))
> Mensajes de aviso perdidos
> In Ops.factor(factor(rep(x = c("A", "B"), each = 2))) :
>   + not meaningful for factors
> >  dat$Condicion2 <-
> +   + factor(rep(x= c("X","Y")))
> Mensajes de aviso perdidos
> In Ops.factor(factor(rep(x = c("X", "Y")))) : + not meaningful for factors
> >  mod <- lmer( RT ~  Condicion1 * Condicion2 + (1|Subject), data=dat)
> Error en FUN(X[[1L]], ...) :
>   Invalid grouping factor specification, Subject
> >  summary(mod)
> Linear mixed model fit by REML ['lmerMod']
> Formula: RT ~ Condicion1 * Condicion2 + (1 | Subject)
>    Data: dat
>
> REML criterion at convergence: 145.1507
>
> Random effects:
>  Groups   Name        Variance Std.Dev.
>  Subject  (Intercept)   0.0     0.00
>  Residual             340.9    18.46
> Number of obs: 20, groups: Subject, 4
>
> Fixed effects:
>                         Estimate Std. Error t value
> (Intercept)             494.7082     8.2575   59.91
> Condicion1B               6.7442    11.6779    0.58
> Condicion2Y              -1.1768    11.6779   -0.10
> Condicion1B:Condicion2Y   0.9188    16.5150    0.06
>
> Correlation of Fixed Effects:
>             (Intr) Cndc1B Cndc2Y
> Condicion1B -0.707
> Condicion2Y -0.707  0.500
> Cndcn1B:C2Y  0.500 -0.707 -0.707
> >
> >  pamer.fnc(mod)
> Error en qr(model@X) :
>   error in evaluating the argument 'x' in selecting a method for function
> 'qr': Error: no hay un slot de nombre "X" para ese objeto de clase
> "lmerMod"
> >  sessionInfo()
> R version 3.0.1 (2013-05-16)
> Platform: x86_64-w64-mingw32/x64 (64-bit)
>
> locale:
> [1] LC_COLLATE=Spanish_Spain.1252  LC_CTYPE=Spanish_Spain.1252
> [3] LC_MONETARY=Spanish_Spain.1252 LC_NUMERIC=C
> [5] LC_TIME=Spanish_Spain.1252
>
> attached base packages:
> [1] stats     graphics  grDevices utils     datasets  methods   base
>
> other attached packages:
> [1] LMERConvenienceFunctions_2.1 lme4_1.0-4
> [3] Matrix_1.0-12                lattice_0.20-15
>
> loaded via a namespace (and not attached):
> [1] grid_3.0.1    MASS_7.3-26   minqa_1.2.1   nlme_3.1-109  splines_3.0.1
>
> # ------------------------------
>
> --------------------------
> Con R 2.15.3 Windows NO FUNCIONA
> # --------------------------------------------------------
>
>
> > require(lme4)Loading required package: lme4Loading required package:
> latticeLoading required package: Matrix
> > require(LMERConvenienceFunctions)Loading required package:
> LMERConvenienceFunctions
> > dat <- data.frame(row.names= 1:20)
>
> > dat$Subject <-
> +   factor(rep(x= c("S1","S2","S3","S4"), each= 5))
>
> > dat$RT <- rnorm( 20, mean= 500,sd= 20)
>
> > dat$Condicion1 <-
> +   factor(rep(x= c("A","B"), each= 2))
>
> > dat$Condicion2 <-
> +   factor(rep(x= c("X","Y")))
>
> > mod <- lmer( RT ~  Condicion1 * Condicion2 + (1|Subject), data=dat)
>
> > summary(mod)
> Linear mixed model fit by REML ['lmerMod']
> Formula: RT ~ Condicion1 * Condicion2 + (1 | Subject)
>    Data: dat
>
> REML criterion at convergence: 145.443
>
> Random effects:
>  Groups   Name        Variance Std.Dev.
>  Subject  (Intercept)   0.0     0.00
>  Residual             347.2    18.63
> Number of obs: 20, groups: Subject, 4
>
> Fixed effects:
>                         Estimate Std. Error t value
> (Intercept)              492.738      8.333   59.13
> Condicion1B               11.351     11.785    0.96
> Condicion2Y               -1.000     11.785   -0.08
> Condicion1B:Condicion2Y   -6.865     16.666   -0.41
>
> Correlation of Fixed Effects:
>             (Intr) Cndc1B Cndc2Y
> Condicion1B -0.707
> Condicion2Y -0.707  0.500
> Cndcn1B:C2Y  0.500 -0.707 -0.707
>
> > pamer.fnc(mod)Error en qr(model@X) :
>   error in evaluating the argument 'x' in selecting a method for
> function 'qr': Error: no hay un slot de nombre "X" para ese objeto de
> clase "lmerMod"> sessionInfo()R version 2.15.3 (2013-03-01)
> Platform: x86_64-w64-mingw32/x64 (64-bit)
>
> locale:
> [1] LC_COLLATE=Spanish_Spain.1252  LC_CTYPE=Spanish_Spain.1252
> [3] LC_MONETARY=Spanish_Spain.1252 LC_NUMERIC=C
> [5] LC_TIME=Spanish_Spain.1252
>
> attached base packages:
> [1] stats     graphics  grDevices utils     datasets  methods   base
>
> other attached packages:
> [1] LMERConvenienceFunctions_2.1 lme4_1.0-4
> [3] Matrix_1.0-11                lattice_0.20-13
>
> loaded via a namespace (and not attached):
> [1] grid_2.15.3    MASS_7.3-23    minqa_1.2.1    nlme_3.1-108
> splines_2.15.3
> [6] tools_2.15.3
>
>
> # --------------------------------------------------------
> Con R 2.15.2 Windows FUNCIONA
> # --------------------------------------------------------
> >  require(lme4)
> >  require(LMERConvenienceFunctions)
> >  dat <- data.frame(row.names= 1:20)
> >  dat$Subject <-
> +   factor(rep(x= c("S1","S2","S3","S4"), each= 5))
> >  dat$RT <- rnorm( 20, mean= 500,sd= 20)
> >  dat$Condicion1 <-
> +    factor(rep(x= c("A","B"), each= 2))
> >  dat$Condicion2 <-
> +    factor(rep(x= c("X","Y")))
> >  mod <- lmer( RT ~  Condicion1 * Condicion2 + (1|Subject), data=dat)
> >  summary(mod)
> Linear mixed model fit by REML
> Formula: RT ~ Condicion1 * Condicion2 + (1 | Subject)
>    Data: dat
>    AIC   BIC logLik deviance REMLdev
>  162.3 168.3 -75.15    175.7   150.3
> Random effects:
>  Groups   Name        Variance Std.Dev.
>  Subject  (Intercept) 101.59   10.079
>  Residual             405.85   20.146
> Number of obs: 20, groups: Subject, 4
>
> Fixed effects:
>                         Estimate Std. Error t value
> (Intercept)             504.9071    10.3897   48.60
> Condicion1B              -0.5751    12.8853   -0.04
> Condicion2Y              -5.6312    12.8853   -0.44
> Condicion1B:Condicion2Y  -5.5012    18.2226   -0.30
>
> Correlation of Fixed Effects:
>             (Intr) Cndc1B Cndc2Y
> Condicion1B -0.620
> Condicion2Y -0.620  0.500
> Cndcn1B:C2Y  0.438 -0.707 -0.707
> >
> >  pamer.fnc(mod)
>                       Df   Sum Sq  Mean Sq F value upper.den.df upper.p.val
> Condicion1             1  54.0666  54.0666  0.1332           16      0.7199
> Condicion2             1 343.4881 343.4881  0.8463           16      0.3713
> Condicion1:Condicion2  1  36.9835  36.9835  0.0911           16      0.7666
>                       lower.den.df lower.p.val expl.dev.(%)
> Condicion1                      12      0.7215       0.6186
> Condicion2                      12      0.3757       3.9298
> Condicion1:Condicion2           12      0.7679       0.4231
> >  sessionInfo()
> R version 2.15.2 (2012-10-26)
> Platform: x86_64-w64-mingw32/x64 (64-bit)
>
> locale:
> [1] LC_COLLATE=Spanish_Spain.1252  LC_CTYPE=Spanish_Spain.1252
> [3] LC_MONETARY=Spanish_Spain.1252 LC_NUMERIC=C
> [5] LC_TIME=Spanish_Spain.1252
>
> attached base packages:
> [1] stats     graphics  grDevices utils     datasets  methods   base
>
> other attached packages:
> [1] LMERConvenienceFunctions_2.0 lme4_0.999999-2
> [3] Matrix_1.0-9                 lattice_0.20-10
>
> loaded via a namespace (and not attached):
> [1] grid_2.15.2   nlme_3.1-105  stats4_2.15.2
>
> # --------------------------------------------------------
> Con R 2.15.2 Uubntu FUNCIONA
> # --------------------------------------------------------
> > require(lme4)
> > require(
> LMERConvenienceFunctions)
> > dat <- data.frame(row.names= 1:20)
> > dat$Subject <-
> + factor(rep(x= c("S1","S2","S3","S4"), each= 5))
> > dat$RT <- rnorm( 20, mean= 500,sd= 20)
> > dat$Condicion1 <-
> + factor(rep(x= c("A","B"), each= 2))
> > dat$Condicion2 <-
> + factor(rep(x= c("X","Y")))
> > mod <- lmer( RT ~  Condicion1 * Condicion2 + (1|Subject), data=dat)
> > summary(mod)
> Linear mixed model fit by REML
> Formula: RT ~ Condicion1 * Condicion2 + (1 | Subject)
>    Data: dat
>    AIC   BIC logLik deviance REMLdev
>  163.7 169.6 -75.83    177.1   151.7
> Random effects:
>  Groups   Name        Variance Std.Dev.
>  Subject  (Intercept)   0.00    0.000
>  Residual             511.81   22.623
> Number of obs: 20, groups: Subject, 4
>
> Fixed effects:
>                         Estimate Std. Error t value
> (Intercept)              499.096     10.117   49.33
> Condicion1B               15.992     14.308    1.12
> Condicion2Y                7.018     14.308    0.49
> Condicion1B:Condicion2Y  -34.872     20.235   -1.72
>
> Correlation of Fixed Effects:
>             (Intr) Cndc1B Cndc2Y
> Condicion1B -0.707
> Condicion2Y -0.707  0.500
> Cndcn1B:C2Y  0.500 -0.707 -0.707
> > pamer.fnc(mod)
>                       Df    Sum Sq   Mean Sq F value upper.den.df
> upper.p.val lower.den.df lower.p.val expl.dev.(%)
> Condicion1             1   10.4232   10.4232  0.0204           16
> 0.8883           12      0.8889       0.0965
> Condicion2             1  542.6392  542.6392  1.0602           16
> 0.3185           12      0.3235       5.0234
> Condicion1:Condicion2  1 1520.0902 1520.0902  2.9700           16
> 0.1041           12      0.1105      14.0720
> > sessionInfo()
> R version 2.15.2 (2012-10-26)
> Platform: x86_64-pc-linux-gnu (64-bit)
>
> locale:
>  [1] LC_CTYPE=es_ES.UTF-8       LC_NUMERIC=C
> LC_TIME=es_ES.UTF-8        LC_COLLATE=es_ES.UTF-8
>  [5] LC_MONETARY=es_ES.UTF-8    LC_MESSAGES=es_ES.UTF-8
> LC_PAPER=C                 LC_NAME=C
>  [9] LC_ADDRESS=C               LC_TELEPHONE=C
> LC_MEASUREMENT=es_ES.UTF-8 LC_IDENTIFICATION=C
>
> attached base packages:
> [1] stats     graphics  grDevices utils     datasets  methods   base
>
> other attached packages:
> [1] LMERConvenienceFunctions_2.0 lme4_0.999999-2
> Matrix_1.0-11                lattice_0.20-13
>
> loaded via a namespace (and not attached):
> [1] grid_2.15.2   nlme_3.1-108  stats4_2.15.2 tools_2.
>
>
> --
>
>         [[alternative HTML version deleted]]
>
>
> _______________________________________________
> R-help-es mailing list
> R-help-es@r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-help-es
>
>

	[[alternative HTML version deleted]]

