similar to: Model comparison with missing values

Displaying 20 results from an estimated 300 matches similar to: "Model comparison with missing values"

2007 Jun 04
3
Extracting lists in the dataframe $ format
I'm new to R and am trying to extract the factors of a dataframe using numeric indices (e.g. df[1]) that are input to a function definition instead of the other types of references (e.g. df$out). df[1] is a list(?) whose class is "dataframe". These indexed lists can be printed successfuly but are not agreeable to the plot() and lm() functions shown below as are their df$out
2008 Oct 30
0
lme4/anova, error message: "Calculated PWRSS for a LMM is negative"
Dear all, I'm using the latest version of the package lme4 and R version 2.7.2 (2008-08-25). After I run the model, I get the results of the model (cf. below). Then, I run an ANOVA using the "anova" function and I get the following message "Error in anova(lmer1) : Calculated PWRSS for a LMM is negative". I went trough the R-mailing list and a similar error message was
2008 Sep 24
0
weights option in lmer
Hi all, I am trying to run a linear mixed effect models in lmer() from the lme4 package using the weights option. I am using the R version 2.7.2 (2008-08-25) and lmer version in lme4_0.999375-26, which I think it is the latest version! I am getting and error message when I add the option "weights" in the lmer function. This is the error message I get "Error en
2010 Nov 04
3
ANOVA table and lmer
The following output results from fitting models using lmer and lm to data arising from a split-plot experiment (#320 from "Small Data Sets" by Hand et al. 1994). The data is given at the bottom of this message. My question is why is the sum of squares for variety (V) different in the ANOVA table generated from the lmer model fit from that generated by the lm model fit. The
2012 Nov 06
2
Column names containing ` in R
Hi, My data has column names which has ` character. For example , *> names(dataframe) [1] "`region" "farmsize`" "farmincome" "maincrop" "claimvalue"* If i use these objects in my function, the following error is thrown. *lmm<-lm(``region`~farmincome) Error: attempt to use zero-length variable name* Is there a way, say an escape
2015 Sep 17
1
names treatment in optim()
Dear both, I have found that names are not treated in the same way in optim() depending on the optimization method (argument method). The example below shows the difference between the Brent method and the L-BFGS-B method. f <- function(x){ y <- x^2;names(y) <-"f(x)";y} optim(10, f, method="Brent", lower=-1, upper=10)$value optim(10, f, method="L-BFGS-B",
2017 May 10
3
registering Fortran routines in R packages
Thanks for your email. I try to change the name in lowercase but it conflicts with a C implementation also named halton. So I rename the C function halton2() and sobol2() while the Fortran function are HALTON() and SOBOL() (I also try lower case in the Fortran code). Unfortunately, it does not help since I get init.c:97:25: error: use of undeclared identifier 'halton_'; did you mean
2012 Nov 07
2
LMER vs PROC MIXED estimates
Hi experts, I have just about started to use R (after using SAS for more than 5 years) and still finding my way...I have been trying to replicate PROC MIXED results in LMER but noticed that the estimates are coming different. My SAS code is as follows (trying to randomise X2 and Intercept): PROC MIXED DATA = <DATASET NAME> NAMELEN=100 METHOD=REML MAXITER=1000; CLASS GEOGRAPHY; MODEL y
2017 May 09
2
registering Fortran routines in R packages
Dear list, I?m trying to register Fortran routines in randtoolbox (in srt/init.c file), see https://r-forge.r-project.org/scm/viewvc.php/pkg/randtoolbox/src/init.c?view=markup&root=rmetrics. Reading https://cran.r-project.org/doc/manuals/r-release/R-exts.html#Registering-native-routines and looking at what is done in stats package, I first thought that the following code will do the job:
2005 Mar 28
1
mixed model question
I am trying to fit a linear mixed model of the form y_ij = X_ij \beta + delta_i + e_ij where e_ij ~N(0,s^2_ij) with s_ij known and delta_i~N(0,tau^2) I looked at the ecme routine in package:pan, but this routine does not allow for different Vi (variance covariance matrix of the e_i vector) matrices for each cluster. Is there an easy way to fit this model in R or should I bite the bullet and
2012 May 06
2
Interaction plot between 2 continuous variables
I have two very strong fixed effects in a LMM (both continuous variables). model <- lmer( y ~ time + x1+x2 + (time|subject)) Once I fit an interaction of these variables, both main effects disappear and I get a strong interaction effect. model <- lmer( y ~ time + x1*x2 + (time|subject)) I would like to plot this effect now, but have not been able to do so, reading through ggplot2 and
2008 Mar 07
1
parameters for lbfgsb (function for optimization)
Can anyone help me with lbfgsb (function for optimization)? It takes the following parameters: void lbfgsb (int n, int lmm, double *x, double *lower, double *upper, int *nbd, double *Fmin, optimfn fn, optimgr gr, int *fail, void *ex, double factr, double pgtol, int *fncount, int *grcount, int maxit, char *msg, int trace, int nREPORT); What do I put for parameter ex (11th parameter)? I looked at
2018 Mar 22
1
adjusted values
Hi all, I am fitting a linear mixed model with lme4 in R. The model has a single factor (des_days) with 4 levels (-1,1,14,48), and I am using random intercept and slopes. Fixed effects: data ~ des_days Value Std.Error DF t-value p-value (Intercept) 0.8274313 0.007937938 962 104.23757 0.0000 des_days1 -0.0026322 0.007443294 962 -0.35363 0.7237 des_days14 -0.0011319
2015 Jan 23
1
Programming Tools CTV
Dear Willem, Personally, I use the R-forge project for the distribution CTV : https://r-forge.r-project.org/projects/ctv/ It?s an alternative option to github. Regards, Christophe --------------------------------------- Christophe Dutang LMM, UdM, Le Mans, France web: http://dutangc.free.fr Le 23 janv. 2015 ? 12:49, Luca Braglia <lbraglia at gmail.com> a ?crit : > Hi Willem >
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,
2009 Aug 26
1
lme: how to nest a random factor in a fixed factor?
Dear all, I have an experimental setup in which a random variable is nested within a fixed variable; however I have troubles specifying the correct LMM with lme. I have searched the lists but haven't been able to find an example like my setup, which I unfortunately need to get this stuff right. Pinheiro & Bates is great but I still can't figure out how to do it. My
2006 Oct 20
1
Translating lme code into lmer was: Mixed effect model in R
This question comes up periodically, probably enough to give it a proper thread and maybe point to this thread for reference (similar to the 'conservative anova' thread not too long ago). Moving from lme syntax, which is the function found in the nlme package, to lmer syntax (found in lme4) is not too difficult. It is probably useful to first explain what the differences are between the
2012 Oct 28
0
lbfgsb from C
Hi, I wanted to use R's lbfgsb method for minimization from C. Unfortunately, my toy examples always crashes (segmentation fault). What's wrong with it? double eval(int n, double* par, void *ex) { double result = 0; for (int i=0; i<n; ++i) { result += par[i]*par[i]; } printf("result=%.2f\n", result); return result; } void grad(int n, double *par, double *gr,
2016 Apr 04
0
Find the dataset(s) that contain(s) non-ASCII characters
Dear list, I?m maintainsing a package containing only datasets (152): http://dutangc.free.fr/pub/RRepos/web/CASdatasets-index.html <http://dutangc.free.fr/pub/RRepos/web/CASdatasets-index.html> When R CMD checking the package, I get the following NOTE * checking data for non-ASCII characters ... NOTE Note: found 4 marked UTF-8 strings I wonder how to find which dataset(s) (all recorded
2016 Apr 13
0
on the output of constrOptim()
Dear list, The following example of constrOptim() where the initial point is the solution shows that the component counts is not a two-element vector as documented in the man page. constrOptim(c(1,1), fr, grr, ui = diag(2), ci = c(0,0)) Does anyone have the same behavior? A possible solution is to put line 69 in constrOptim.R before the first possible break line 67. Regards, Christophe