Displaying 20 results from an estimated 10000 matches similar to: "factor labels in model.frame"
2009 Aug 17
1
[Fwd: Re: R code to reproduce (while studying) Bates & Watts 1988]]]
Kevin Wright wrote:
> library(nlme)
> m2 <- gnls(conc ~ t1*(1-t2*exp(-k*time)),
> data = df.Chloride,
> start = list(
> t1 = 35,
> t2 = 0.91,
> k = 0.22))
So my error was to use nls instead that gnls. Thanks a lot, Kevin.
> summary(m2)
> plot(m2)
> lag.plot(resid(m2), do.lines=FALSE)
>
2011 Dec 03
1
partial mantel tests in ecodist with intential NA values.
I would like to perform partial mantel tests on only within group values, with "between group" values assigned to NA.
This is possible in package ncf partial.mantel.test, however this sues a different permutation to that used in ecodist.ecodist will not accept data with NA values, returning a "matrix is not square error.
is it possible to perform this test in ecodist?
many thanks
2010 Oct 24
1
Optimize parameters of ODE Problem which is solved numeric
Hi,
I have a data-matrix:
> PID
sato hrs fim health
214 3 4.376430 6.582958 5
193 6 4.361825 3.138525 6
8441 6 4.205771 3.835886 7
7525 6 4.284489 3.245139 6
6806 7 4.168926 2.821833 7
5682 7 1.788707 1.212653 7
5225 6 1.651463 1.436980 7
4845 6 1.692710 1.267359 4
4552 5 1.686448 1.220539 6
2012 Nov 06
1
Filling matrix elements with a function
Hi all,
I have a matrix simulating migration in a spatial model. I want to be
able to define movement (the values of m1, m2 and m3) as only != 0
between adjacent patches and contingent on certain conditions as
defined in the function.
Here is the code:
WET<-function(t) {everglades$precipitation[t]} #simply reads
precipitation data from a csv, value is numeric
AB<-function(WET,t)
2011 Mar 08
1
SEM error
Dear All,
I am new for R and SEM. I try to fit the model with Y (ordinal outcome), X
(4 categorical data), M1-M3 (continuous), and 2 covariates (Age&sex) as a
diagram.
library(polycor)
model.ly <-specify.model()
1: x -> m1, gam11, NA
2: x -> m2, gam12, NA
3: x -> m3, gam13, NA
4: age -> m1, gam14, NA
5: age -> m2, gam15, NA
6: age -> m3, gam16, NA
7: sex -> m1,
2004 Dec 19
1
BRI Error with zaphfc
Hi
I have a small ISDN PABX , (BRI) at home - Siemens Gigaset 4175 which has
cordless DECT extensions.
I have set up asterisk on FC3 with two HFC cards and I am using the latest
bristuff.
I am trying to use * between my ISDN line and my PABX.
One card is in TE mode and can receive and make calls OK. I can make and
receive external calls to a SIP phone.
I cannot get the other card to talk to my
2011 May 31
2
In a formula, what is the interaction of the intercept and a factor?
For a pedagogical purpose, I was trying to show how the formula for a simple
regression line (~1+x) could be crossed with a factor (~1:group + x:group)
to fit separate regressions by group. For example:
set.seed(201108)
dat <- data.frame(x=1:15, y=1:15+rnorm(15),
group = sample(c('A','B'), size=15,
replace=TRUE))
m1 <- lm(y~ 1 + x, data=dat)
2017 Jun 06
2
integrating 2 lists and a data frame in R
> On Jun 6, 2017, at 4:01 AM, Jim Lemon <drjimlemon at gmail.com> wrote:
>
> Hi Bogdan,
> Kinda messy, but:
>
> N <- data.frame(N=c("n1","n2","n3","n4"))
> M <- data.frame(M=c("m1","m2","m3","m4","m5"))
> C <-
2012 Nov 09
6
(sin asunto)
Saludos, tengo un problema que no puedo resolver dentro del R
Estoy creando una funcion que a partir de un objeto compuesto por diferentes matrices como el que esta a continuacion:
[[1]]
M1 M2 M3 M4
sp1 2 0 1 8
sp2 4 5 2 4
sp3 0 0 4 0
sp4 5 7 5 0
sp5 0 4 0 0
[[2]]
M3 M2 M4 M1
sp1 1 0 8 2
sp2 2 5 4 4
sp3 4 0 0 0
sp4 5 7 0 5
sp5 0 4 0 0
[[3]]
2007 Jun 06
3
1.4 Zaptel/Sangoma Issues on CentOS
Any ideas? Sangoma support is closed for the evening.
I have the latest Sangoma drivers and Asterisk 1.4 everything installed.
When I fire up asterisk, I keep getting "Primary D-Channel on span 1 up"
repeated over and over. The B channels never come up. There are no
errors in any of the logs, zttool, or the wanpipe tools.
Intense pri debug output:
< Unnumbered frame:
< SAPI:
2017 Jun 06
0
integrating 2 lists and a data frame in R
Thank you David. Using xtabs operation simplifies the code very much, many
thanks ;)
On Tue, Jun 6, 2017 at 7:44 AM, David Winsemius <dwinsemius at comcast.net>
wrote:
>
> > On Jun 6, 2017, at 4:01 AM, Jim Lemon <drjimlemon at gmail.com> wrote:
> >
> > Hi Bogdan,
> > Kinda messy, but:
> >
> > N <-
2009 Apr 03
1
Hello! I got error in C - R
Hello,
My name is Ick Hoon Jin and I am Ph. D. student in Texas A & M Univ..
When I run the C embedded in R in the Linux system, I confront the
following error after 6,000 iteration. By googling I found this error is
from the problem in C.
*** caught segfault ***
address (nil), cause 'memory not mapped'
My C code is following:
2005 Mar 23
1
more classes to one class in one dataset
I have a big database which more classes in class variable. I want to
make each class to one dataset, for example:
x1 x2 x3 x4 class
a b a c c M1
c b b c c M4
c c a c c M2
c a c a a M2
c c a a a M1
c a b c a M3
c c a b c M3
c a c a b M2
c c a b a M1
How can I make, like:
x1 x2 x3 x4 class
a b a c c M1
c c a a a M1
c
2011 Sep 28
1
Wilcox test and data collection
Dear Contributors
I have a problem with the collection of data from the results of a test.
I need to perform a comparative test over groups of data , recall the value
of the pvalue and create a table.
My problem is in the way to replicate the analysis over and over again over
subsets of data according to a condition.
I have this database, called y:
gg t1 t2 d
40 1 1
2013 Jun 14
2
significance testing for the difference in the ratio of means
I have a question regarding significance testing for the difference in the
ratio of means.
The data consists of a control and a test group, each with and without
treatment. I am interested in testing if the treatment has a significantly
different effect (say, in terms of fold-activation) on the test group
compared to the control.
The form of the data with arbitrary n and not assuming equal
2017 Jun 06
1
integrating 2 lists and a data frame in R
Here's another approach:
N <- data.frame(N=c("n1","n2","n3","n4"))
M <- data.frame(M=c("m1","m2","m3","m4","m5"))
C <- data.frame(n=c("n1","n2","n3"), m=c("m1","m1","m3"), I=c(100,300,400))
# Rebuild the factors using M and N
C$m <-
2017 Jun 06
1
integrating 2 lists and a data frame in R
Simple matrix indexing suffices without any fancier functionality.
## First convert M and N to character vectors -- which they should
have been in the first place!
M <- sort(as.character(M[,1]))
N <- sort(as.character(N[,1]))
## This could be a one-liner, but I'll split it up for clarity.
res <-matrix(NA, length(M),length(N),dimnames = list(M,N))
res[as.matrix(C[,2:1])] <-
2011 Feb 02
2
Counter in a For Loop - Efficiency Issue
I have a 32000 x 14 matrix (M) where entry (x, y) corresponds to
person x at a discrete time y. I then have a matrix (M2) of 60000 x 2
where each entry is a an event by a person that is in the above 32000
and at a time that is in the range of the discrete time points above.
I want to populate the another matrix (M3) such that (x, y) is the
number of events of person x between times y-1 and y. This
2010 May 11
1
nls() and nls2() behavior?
first, apologies for so many posts yesterday and today. I am
wrestling with nls() and nls2(). I have tried to whittle it down to a
simple example that still has my problem, yet can be cut-and-pasted
into R. here it is:
library(nls2)
options(digits=12);
y= c(0.4334,0.3200,0.5848,0.6214,0.3890,0.5233,0.4753,0.2104,0.3240,0.2827,0.3847,0.5571,0.5432,0.1326,0.3481)
x=
2013 Feb 23
1
anova comparisons
I have several linear models on the same data:
m1 <- lm(y ~ poly(x,1))
m2 <- lm(y ~ poly(x,2))
m3 <- lm(y ~ poly(x,3))
What I don't understand is why
anova(m1, m2, m3, test="F")
- yields the same RSS and SS values, but a different p-value from anova(m1,
m2, test="F")
- when it also yields the SAME as anova(m2, m3, test="F")
What am I missing?
Rob