similar to: LMER: How to specify Random Effects

Displaying 20 results from an estimated 300 matches similar to: "LMER: How to specify Random Effects"

2018 Feb 09
1
Optim function returning always initial value for parameter to be optimized
Hello, I'm trying to fminimize the following problem: You have a data frame with 2 columns. data.input= data.frame(state1 = (1:500), state2 = (201:700) ) with data that partially overlap in terms of values. I want to minimize the assessment error of each state by using this function: err.th.scalar <- function(threshold, data){ state1 <- data$state1 state2 <- data$state2
2009 Aug 01
2
Add columns in a dataframe and fill them from another table according to a criteria
Deare R users I am new to R. What I want to do is explained below;- I have table called States.Prob which is given below:- This table gives the probabilities of the changes in the swap curve depending on the state of the swap curve. I want to put these probabilities in my dataframe mydata(given after the prob table). Prob of States Changes State1 State2 State3 State4 a
2011 Nov 15
1
Remove thw data from the dataframe
Hi, I want to remove the entire row from the dataset if any of the row contains blank or NA my dataset look like State Year Y X2 X3 X4 X5 X6 State1 1960 27.8 397.5 42.2 50.7 78.3 65.8 State2 1960 29.9 413.3 38.1 52 79.2 66.9 State1 1961 29.8 439.2 40.3 54 79.2 67.8 State2 1961 30.8 459.7 39.5 79.2 69.6 State1 1962 31.2 492.9 37.3 54.7 77.4 68.7 State2 1962 528.6 38.1 80.2 73.6 State1 1963
2012 Mar 27
1
help in replacing for llop
Hi I have records like like this X1 X2 State 34 72 state1 9 63 state1 49 31 state1 60 34 state1 80 73 state1 60 20 state2 59 87 state2 88 20 state2 71 66 state2 65 56 state2 59 16 state1 60 100 state2 I want to get the summarize value like mean median histogram for X1 and X2 based on state. I'm using FOR loop for this. Is there any method to remove for loop and use apply or any
2011 Dec 06
1
making changes to global variables in functions
I'm trying to write a function that takes several objects with many different attributes and then changes their attributes. So what I wanted to happen in the simplified example below is for the function to change the attributes of the objects state1 and state2 that are passed to it. But because stateA and stateB are local, this isn't working. Are there any easy solutions? e.g., if I could
2005 May 24
1
rsync incorrectly deletes files ?
rsync -e 'ssh -x' --log-format="%o /%n %b" -tLr --delete --files-from=files-to-sync --exclude-from=files-to-exclude user@host:/ /temp/ del. /etc/mail/spamfilter/mx1/whitelist.conf 0 del. /etc/mail/spamfilter/mx1/blacklist.conf 0 recv /etc/mail/spamfilter/mx1/ 0 recv /etc/mail/spamfilter/mx1/blacklist.conf 211 recv /etc/mail/spamfilter/mx1/whitelist.conf 924 Why does rsync
2009 Jul 31
1
Fill dataframe from a table according to a criteria
Deare R users I am new to R. What I want to do is explained below;- I have table called States.Prob which is given below Prob of States Changes State1 State2 State3 State4 A Pa1 Pa2 Pa3 Pa4 B Pb1 Pb2 Pb3 Pb4 C Pc1 Pc2 Pc3 Pc4 D Pd1 Pd2 Pd3 Pd4 and I have a dataframe called
2011 Jul 27
1
To Merge or to use Indicator Variables?
Greetings all, I have two sets of data that I would like to investigate. The first is gene/genome related data given different 'cell-states'. The second set of data is relates the genes to a biological pathway. /(I think in pictures so here goes.)/ *dataframe1* gene, cell-state1, cell-state2 gene1, x1, y1 gene2, x2, y2 gene.x, ..., ... *dataframe2* pathway1, gene-x1, gene-x2, ...
2001 Mar 16
1
combine dataset
Hi, I have two data sets look like below: ========================== state count1 percent1 CA 19 0.34 TX 22 0.35 FL 11 0.24 OR 34 0.42 GA 52 0.62 MN 12 0.17 NC 19 0.34 state count2 percent2 FL 22 0.35 MN 22 0.35 CA 11 0.24 TX 52 0.62 ========================== How to combine these two data set and make it look like below?
2004 Apr 29
3
Dummies in R
Dear all, my problem is following. I know Stata, but currently I have to use R. Could You please help in finding the analogy to R. (1) creating of City-Dummy. I know in Stata: g byte city=0 replace city=1 if city==12&year==2000 and (2) Create a Time-Dummy-Variable g byte T2000=0 replace T2000=1 if year==2000 (3) I need the City DUmmy for the following combination: I have the
2011 Dec 19
2
summary vs anova
Hi, I'm sure this is simple, but I haven't been able to find this in TFM, say I have some data in R like this (pasted here: http://pastebin.com/raw.php?i=sjS9Zkup): > head(df) gender age smokes disease Y 1 female 65 ever control 0.18 2 female 77 never control 0.12 3 male 40 state1 0.11 4 female 67 ever control 0.20 5 male 63 ever state1 0.16
2012 Jun 28
1
undefined S4 class in parallel computing at snowfall
Dear All, I have a question of how to export S4 class specification to clusters/workers in parallel computing. The package I used is snowfall. The problem is reproducible as follows. Any hint is greatly appreciated. Edwin Sun === begin =========== library(snowfall) sfInit(parallel = TRUE, cpus = 2) setClass("catt", representation(aa = "numeric")) setClass("dogg",
2009 Jul 28
1
Sort a column in a dataframe
Dear Users This is my dataset called mydata4. I want to sort the dataframe on the first column PxMid which is basically a column with dates. I've tried mydata4<-mydata4[order(mydata4$PxMid),] but it doesnt work. Could it be because these are dates? Please help I'm really stuck !! Thank you for your time. Regards Meenu PxMid EU0006MIndex.x DMSW1Curncy.x DMSW2Curncy.x DMSW3Curncy.x 1
2010 Apr 06
0
Adding labels on maps (using sp, maptools, or something else suggested)
Hello, I would like to place region names (or abbreviations if space is too limited) on a map. I have tried the following, copying and adapting various examples I have seen but without success. The first example is self-contained, but the second one requires the .shp file, which can retrieved at http://www.gadm.org/country. ----- Example 1 ----- library(sp) con <-
2018 Feb 10
0
Optim function returning always initial value for parameter to be optimized
On 02/10/2018 06:00 AM, r-help-request at r-project.org wrote: > Did you check the gradient? I don't think so. It's zero, so of course > you end up where you start. > > Try > > data.input= data.frame(state1 = (1:500), state2 = (201:700) ) > err.th.scalar <- function(threshold, data){ > > state1 <- data$state1 > state2 <- data$state2 >
2012 Jan 13
1
Change state names to abbreviations in an irregular list of names, abbreviations, null values, and foreign provinces
I'm trying to create maps of reptile abundance in different states & counties using data from Herp.net, which provides lists of specimens with the places that they were found. First I would like to parse the list by state using 2-letter abbreviations, since I'm focusing on certain regions. To do this, I've been trying to create a vector (state2) that gives all state names as
2009 Dec 06
2
Error in eval(expr, envir, enclos) : object 'N' not found
I'm running an LSODA to generate some graphs, but I need to stop at a certain point and use those values to generate another LSODA output. This is working fine, but when I try to run the second LSODA, I get the "Error in eval(expr, envir, enclos) : object 'N' not found". Any ideas what can be causing this? I have no object 'N' anywhere in the script. I made an
2005 Aug 12
1
Encode/Decode problem
I'm trying to use the speex API, and I think I'm missing something. I'm running on Mac OSX Tiger, and the attached microphone is a iSight. If I call the "speex_encode_int" function, and then immediately call the "speex_decode_int" function, shouldn't I get back the same data? i.e. in my example code, shouldn't the two arrays contain at least similar
1999 May 15
2
vsize and nsize
I am running R version ??? under Redhat 5.2. It seems as though the --nsize object has no effct on the size of the allocated Ncells as determined using gc(). Yes, I have that much data.... That is if I envoke R with R --vsize 100 --nsize 5000000 then type gc() I get free total Ncells 92202 200000 Vcells 12928414 13107200 Thanks Tony Long Ecology and Evolutionary Biology Steinhaus
2009 Jul 14
2
SOS! error in GLM logistic regression...
Hi all, Could anybody tell me what happened to my logistic regression in R? mylog=glm(mytraindata$V1 ~ ., data=mytraindata, family=binomial("logit")) It generated the following error message: Error in model.frame.default(Terms, newdata, na.action = na.action, xlev = object$xlevels) : factor 'state1' has new level(s) AP Thank you!