search for: ran1

Displaying 7 results from an estimated 7 matches for "ran1".

Did you mean: ran
2005 Feb 23
1
How to conctruct an inner grouping for nlme random statement?
Hello. Im hoping someone can help with a grouping question related to the "random=" statement within the nlme function. How do you specify that some grouping levels are inner to others? I tried several things, given below. Lets say I have a data frame with five variables, resp, cov1, ran1, ran2, group1, and group 2. The formula is resp~cov1 + ran1 + ran2, where the ran are random variables. The data is of length 80, and there are 4 unique factors in group1 and 20 unique factors in group2. These are factors related to ran1 and ran2, respectively. The difficult part is that I wa...
2012 Mar 22
2
Randomly select elements based on criteria
Hi, I want to randomly pick 2 fish born the same day but I need those individuals to be from different families. My table includes 1787 fish distributed in 948 families. An example of a subset of fish born in one specific day would look like: >fish fam born spawn 25 46 43 25 46 56 26 46 50 43 46 43 131 46 43 133 46 64 136 46 43 136 46 42 136 46 50 136 46 85 137 46 64 142 46 85 144 46 56
2018 Mar 04
2
Random Seed Location
...ese type of random needs where true random properties are non-critical. This type of "draw-a-random-number-and-reset-the-seed" is for instance used in parallel:::initDefaultClusterOptions() which is called when the 'parallel' package is loaded: seed <- .GlobalEnv$.Random.seed ran1 <- sample.int(.Machine$integer.max - 1L, 1L) / .Machine$integer.max port <- 11000 + 1000 * ((ran1 + unclass(Sys.time()) / 300) %% 1) if(is.null(seed)) ## there was none, initially rm( ".Random.seed", envir = .GlobalEnv, inherits = FALSE) else # reset assign(".Random.seed",...
2018 Mar 04
0
Random Seed Location
...random > properties are non-critical. This type of > "draw-a-random-number-and-reset-the-seed" is for instance used in > parallel:::initDefaultClusterOptions() which is called when the > 'parallel' package is loaded: > > seed <- .GlobalEnv$.Random.seed > ran1 <- sample.int(.Machine$integer.max - 1L, 1L) / .Machine$integer.max > port <- 11000 + 1000 * ((ran1 + unclass(Sys.time()) / 300) %% 1) > if(is.null(seed)) ## there was none, initially > rm( ".Random.seed", envir = .GlobalEnv, inherits = FALSE) > else # reset > assign(...
2018 Mar 05
1
Random Seed Location
...are non-critical. This type of >> "draw-a-random-number-and-reset-the-seed" is for instance used in >> parallel:::initDefaultClusterOptions() which is called when the >> 'parallel' package is loaded: >> >> seed <- .GlobalEnv$.Random.seed >> ran1 <- sample.int(.Machine$integer.max - 1L, 1L) / .Machine$integer.max >> port <- 11000 + 1000 * ((ran1 + unclass(Sys.time()) / 300) %% 1) >> if(is.null(seed)) ## there was none, initially >> rm( ".Random.seed", envir = .GlobalEnv, inherits = FALSE) >> else # re...
2018 Mar 04
0
Random Seed Location
Thank you, everybody, who replied! I appreciate your valuable advise! I will move the location of the set.seed() command to after all packages have been installed and loaded. Best regards, Gary Sent from my iPad > On Mar 4, 2018, at 12:18 PM, Paul Gilbert <pgilbert902 at gmail.com> wrote: > > On Mon, Feb 26, 2018 at 3:25 PM, Gary Black <gwblack001 at sbcglobal.net> >
2018 Mar 04
3
Random Seed Location
On Mon, Feb 26, 2018 at 3:25 PM, Gary Black <gwblack001 at sbcglobal.net> wrote: (Sorry to be a bit slow responding.) You have not supplied a complete example, which would be good in this case because what you are suggesting could be a serious bug in R or a package. Serious journals require reproducibility these days. For example, JSS is very clear on this point. To your question >