[R] MSVAR

2017-12-08 Thread ah a via R-help
Hello, As I'm interested to search about the monetary transmission channel in our country by MSVAR model,Could you do me favor and tell me How I can run different types of MSVAR model (such as MSIAH(2)-VAR(2)) and finding impulse response function in different regimes and also variance decompositi

Re: [R] Remove

2017-12-08 Thread Jeff Newmiller
In this case I cannot see an advantage to using dplyr over subset, other than if dplyr is your hammer then the problem will look like a nail, or if this is one step in a larger context where dplyr is more useful. Nor do I think this is a good use for mapply (or dplyr::group_by) because the gro

Re: [R] Remove

2017-12-08 Thread Michael Hannon
library(dplyr) DM <- read.table( text='GR x y A 25 125 A 23 135 . . . ) DM %>% filter((GR == "A" & (x >= 15) & (x <= 30)) | (GR == "B" & (x >= 40) & (x <= 50)) | (GR == "C" & (x >= 60) & (x <= 75))) On Fri, Dec 8, 2017 at 4:48 PM, Ashta wrote: >

Re: [R] Remove

2017-12-08 Thread David Winsemius
> On Dec 8, 2017, at 4:48 PM, Ashta wrote: > > Hi David, Ista and all, > > I have one related question Within one group I want to keep records > conditionally. > example within > group A I want keep rows that have " x" values ranged between 15 and 30. > group B I want keep rows that have

Re: [R] Remove

2017-12-08 Thread Ashta
Hi David, Ista and all, I have one related question Within one group I want to keep records conditionally. example within group A I want keep rows that have " x" values ranged between 15 and 30. group B I want keep rows that have " x" values ranged between 40 and 50. group C I want keep r

Re: [R] lmerTest Issues

2017-12-08 Thread Jeff Newmiller
Have you read the error and installed package "purrr"? On Windows at least, previously-installed packages can get removed if you attempt to update them while you have another instance of R open at that time using said packages. Best to close all your instances of R before updating, but you can d

[R] lmerTest Issues

2017-12-08 Thread Andrew Harmon
Hello all, Everything was working very well. Now when I try to load lmerTest using: library("lmerTest"), I get this error: Error: package or namespace load failed for ‘lmerTest’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]): there is no package called ‘purrr’

[R] Need help with labeling a plot correctly

2017-12-08 Thread Neotropical bat risk assessments
Hi all, Eons ago (~2007) Hadley Wickham extremely generously helped me developed a means for plotting temporal activity w/ ggplot. I need to revisit this and have it working again.  I failed to copy the entire legacy code over to my traveling laptop from my workstation, but found a partial bit

Re: [R] trying to find the multiple combinations...

2017-12-08 Thread Ek Esawi
As Burt and Jeff stated that there is an infinite set of solutions. If you are interested in a particular solution, such as getting 15.0078, you can easily achieve that by trial and error; that is fix 1 or 2 variables and change the the rest till you get the desired solution. I tried that and came

[R] Elastic net

2017-12-08 Thread woleogunj...@gmail.com
Dear R users,                          I am using "Glmnet" package in R for applying "elastic net" method. In elastic net, two penalities are applied one is lambda1 for  LASSO and lambda2 for ridge ( zou, 2005) penalty. How can I  write the code to  pre-chose the  lambda1 for LASSO and lambda2 fo

Re: [R] trying to find the multiple combinations...

2017-12-08 Thread Bert Gunter
Please keep all replies onlist if there is no reason to keep them private. I am not a free, private consultant (and so might choose to ignore your followups); and I don't have all or necessarily the best answers anyway. So give yourself the maximal chance to be helped by others. Anyway, ?expand.g

Re: [R] Curiously short cycles in iterated permutations with the same seed

2017-12-08 Thread William Dunlap via R-help
Landau's function gives the maximum cycle length of a permutation. See.,e.g., http://mathworld.wolfram.com/LandausFunction.html. Bill Dunlap TIBCO Software wdunlap tibco.com On Thu, Dec 7, 2017 at 9:34 PM, Eric Berger wrote: > Hi Boris, > Do a search on "the order of elements of the symmetric g

Re: [R] trying to find the multiple combinations...

2017-12-08 Thread Bert Gunter
Are x,y, and z supposed to be positive whole numbers? If so, there may be no solutions. If there is a solution set, of course any multiple of the set is a solution set, so presumably you want a minimal set in some sense. This strikes me as a hard problem mathematically, but maybe there is some obvi

Re: [R] trying to find the multiple combinations...

2017-12-08 Thread Jeff Newmiller
Solve for one of your variables and it will be given in terms of the other two. That is, there is a whole infinite plane of solutions. No, aggregate will not be sufficient to enumerate the solution set.. -- Sent from my phone. Please excuse my brevity. On December 7, 2017 10:37:37 PM PST, Benj