Re: [R] mixed-effects models with (g)lmer in R and model selection

2016-02-19 Thread Bert Gunter
Absolutely! Even more, consult a local expert in applying mixed effects models. The op's strategy sounded to me like a prescription to produce irreproducible results (due to over fitting). Cheers, Bert On Friday, February 19, 2016, Don McKenzie wrote: > This is a complicated and subtle stati

Re: [R] mixed-effects models with (g)lmer in R and model selection

2016-02-19 Thread Jianling Fan
Hello, Wilbert, You did give a good procedure for lme model selection! thanks! I learn some. I am also working on similar problem recently, maybe you can take a look at "glmmLasso" package, which allows model selection in generalized linear mixed effects models using the LASSO shrinkage method.

Re: [R] How to create an executable file from R GUI?

2016-02-19 Thread Adrian Dușa
Your function, buildGui(), what does it use, Tcl/Tk or something else? If it's Tcl/Tk, I believe you need a normal R console opened. My .bat file only works for a command line, which is fine if the user interface opens up in a webpage, but I'm pretty sure it doesn\t work with Tcl/Tk. What kind of w

Re: [R] How a clustering algorithm in R can end up with negative silhouette values?

2016-02-19 Thread ABABAEI, Behnam
Hi Sarah, Thank you for the response. But it is said in its description that after each run (sample), each observation in the whole dataset is assigned to the closest cluster. So how is it possible for one observation to be wrongly allocated, even with clara? Behnam Behnam On Fri, Feb 19,

Re: [R] mixed-effects models with (g)lmer in R and model selection

2016-02-19 Thread Don McKenzie
This is a complicated and subtle statistical issue, not an R question, the latter being the purpose of this list. There are people on the list who could give you literate answers, to be sure, but a statistically oriented list would be a better match. e.g., http://stats.stackexchange.com/ >

Re: [R] Why CLARA clustering method does not give the same classes as when I do clustering manually?

2016-02-19 Thread Sarah Goslee
clara() is a version of pam() adapted to use large datasets. pam() uses the entire dataset, and should give results identical to your manual procedure, or nearly so. clara() works on subsets of the data, so it may give a slightly different result each time you run it. The default parameters for c

Re: [R] How to create an executable file from R GUI?

2016-02-19 Thread Zahra Samadi
Adriana, My GUI file is a function returning a window. This function is named buildGui(). How should I create this batch file using the piece of code you've written? [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -

Re: [R] How a clustering algorithm in R can end up with negative silhouette values?

2016-02-19 Thread Sarah Goslee
Ah, my guess about the confusion was wrong, then. You're misunderstanding silhouette() instead. >From ?silhouette: Observations with a large s(i) (almost 1) are very well clustered, a small s(i) (around 0) means that the observation lies between two clusters, and observations with

Re: [R] How a clustering algorithm in R can end up with negative silhouette values?

2016-02-19 Thread Sarah Goslee
You need to think more carefully about the details of the clara() method. The algorithm draws repeated samples of sampsize from the larger dataset, as specified by the arguments to the function. It clusters each sample in turn, and saves the best one. It uses the medoids from the best one to assig

Re: [R] How a clustering algorithm in R can end up with negative silhouette values?

2016-02-19 Thread Sarah Goslee
That means that points have been assigned to the wrong groups. This may readily happen with a clustering method like cluster::clara() that uses a subset of the data to cluster a dataset too large to analyze as a unit. Negative silhouette numbers strongly suggest that your clustering parameters shou

[R] Problems with the deSolve package

2016-02-19 Thread Alexandre Suire
Hello R-users, I'm trying to build a SIR-like model under R, using the "deSolve" package. I'm trying to do simulations of its dynamic over time, with three differential equations. I'm also looking to calculate the equilibrium state. So far, my code looks like this library(deSolve) #This is

Re: [R] Reading a datetime vector

2016-02-19 Thread D Wolf via R-help
Hello Jim, I ran str() on the vector and it returned character:str("DF_exp.xlsx") chr "DF_exp.xlsx" I tried df2_TZ$DateTimeStamp <- strptime(as.Date(as.character(df2_TZ$DateTimeStamp, format = "%m/%d/%Y %H:%M", tz = "GMT"))), which produced an error: Error in charToDate(x) :   character string

[R] How a clustering algorithm in R can end up with negative silhouette values?

2016-02-19 Thread ABABAEI, Behnam
Hi, We know that clustering methods in R assign observations to the closest medoids. Hence, it is supposed to be the closest cluster each observation can have. So, I wonder how it is possible to have negative values of silhouette , while we are supposedly assign each observation to the closest

[R] mixed-effects models with (g)lmer in R and model selection

2016-02-19 Thread Wilbert Heeringa
Dear all, Mixed-effects models are wonderful for analyzing data, but it is always a hassle to find the best model, i.e. the model with the lowest AIC, especially when the number of predictor variables is large. Presently when trying to find the right model, I perform the following steps: 1.

[R] Why CLARA clustering method does not give the same classes as when I do clustering manually?

2016-02-19 Thread ABABAEI, Behnam
Hi, I am using CLARA (in 'cluster' package). This method is supposed to assign each observation to the closest 'medoid'. But when I calculate the distance of medoids and observations manually and assign them manually, the results are slightly different (1-2 percent of occurrence probability).

Re: [R] sqldf --Warning message:

2016-02-19 Thread Gabor Grothendieck
sqldf does not use Tk so you can ignore this. On Fri, Feb 19, 2016 at 12:32 PM, Divakar Reddy wrote: > Dear R users, > > I'm getting Waring message while trying to load "sqldf" package in R3.2.3 > and assuming that we can ignore this as it's WARNING Message and not an > error message. > Can you g

Re: [R] Reading a datetime vector

2016-02-19 Thread Jeff Newmiller
This is a mailing list. I don't know how you are interacting with it... using a website rather than an email program can lead to some confusion since there can be many ways to accomplish the task of interacting with the mailing list. My email program has a "reply-all" button when I am looking at

[R] sqldf --Warning message:

2016-02-19 Thread Divakar Reddy
Dear R users, I'm getting Waring message while trying to load "sqldf" package in R3.2.3 and assuming that we can ignore this as it's WARNING Message and not an error message. Can you guide me if my assumption is wrong? > library(sqldf); Loading required package: gsubfn Loading required package:

Re: [R] MACRO-LOOP in R

2016-02-19 Thread Thierry Onkelinx
Please keep the mailinglist in cc. You should be able to solve this after reading the helpfiles of ?dplyr::mutate and ?tidyr::spread Best regards, ir. Thierry Onkelinx Instituut voor natuur- en bosonderzoek / Research Institute for Nature and Forest team Biometrie & Kwaliteitszorg / team Biomet