Dear Colleagues, I hope to know how ordinal logistic regression with a mixed model is made in R. We (My colleague and I) are studying the behavior of a beetle. The attraction of beetles to a stimulus are recorded: the response is Slow, Mid, or Fast. They are based on the time after the presentation of the stimulus to the beetles. Because we do not observe the behavior continuously but do record the number of beetles near the stimulus at the pre-determined two timings. The beetles that are near the stimulus at the 1st timing are "Fast". Those that come to 'near the stimulus' between the first and second timings are "Mid". Those that do not come to 'near the stimulus' till the second timing are "Slow". The response variable is an ordinal one. We applied 3 treatments (say, A, B and C) for groups of the beetles. We had several groups for each of the treatments. A group of beetles was reared in a container. I think the difference among groups under a given treatment is random-effect, while the difference among the treatments is fixed-effect. So , I hope to know the information on ordinal logistic regression in a mixed model in R. ****** **Kasuya, Eiiti **Department of Biology, **Faculty of Sciences, **Kyushu University, **Hakozaki, **Hukuoka,812-8581(postal code) **Japan **telephone 092-642-2624 or 092-642-2623 **facsimile 092-642-2645 ******
Domenico Vistocco
2006-Mar-22 15:15 UTC
[R] Use of the index of a for loop to assign values to the rows of a series of variables
Dear All, It is difficult to summarize the question in few words. So, please, look at the following example. Thanks in advance, domenico ---------------------------------------------------------------------------------------------------------------------------------------------------------- rm(list = ls()) posfix=1:5* 10 for(i in posfix) assign(paste("matX.",i,sep=""),matrix(0,3,2)) ls() [1] "i" "matX.10" "matX.20" "matX.30" "matX.40" "matX.50" "posfix" AT THIS STEP I HAVE 5 MATRIX OF ZEROS (3 ROWS PER 2 COLUMNS) NOW I WOULD LIKE TO ASSIGN TO A ROW OF THE 5 MATRICES A VALUE RELATED TO THE INDEX OF A FOR LOOP for(i in 1:length(posfix)) assign(paste("matX.",posfix[i],"[",i,",]",sep=""),i) ls() [1] "i" "matX.10" "matX.10[1,]" "matX.20" "matX.20[2,]" [6] "matX.30" "matX.30[3,]" "matX.40" "matX.40[4,]" "matX.50" [11] "matX.50[5,]" "posfix" ?????????????????? WHY IT DOES NOT ASSIGN THE VALUE TO THE ROWS OF THE PRE-INITIALIZED VARIABLES. WHERE IS MY ERROR?