Displaying 20 results from an estimated 30000 matches similar to: "more classes to one class in one dataset"
2008 Aug 04
1
simulate data based on partial correlation matrix
Given four known and fixed vectors, x1,x2,x3,x4, I am trying to
generate a fifth vector,z, with specified known and fixed partial
correlations.
How can I do this?
In the past I have used the following (thanks to Greg Snow) to
generate a fifth vector based on zero order correlations---however I'd
like to modify it so that it can generate a fifth vector with specific
partial
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
2012 Apr 20
1
predictOMatic for regression. Please try and advise me
I'm pasting below a working R file featuring a function I'd like to polish up.
I'm teaching regression this semester and every time I come to
something that is very difficult to explain in class, I try to
simplify it by writing an R function (eventually into my package
"rockchalk"). Students have a difficult time with predict and newdata
objects, so right now I'm
2008 Apr 19
2
problem in caluclaring the multiple regression
I am trying to calculate the regression for the follwing input data stored in
'data.txt' file.I am reading this and storing it in the variable i .then i
am trying to get the predicted value using f1 as dependent and others
f2....f10 as independent variables.It is giving the following error. Also i
want that i shoul get one predicted value for each row(y). What should i do.
Please help me
2007 May 29
1
rgl.postscript
Hi,
I am having an issue when creating a postscript file from RGL window. It
seems to cut off some of the axis labels. Here is the code I am using.
I created a 3D plot using RGL_0.71 with R 2.5 on Windows XP.
z1<-c(5,4,1,4.5,2,3,2,1,1)
z2<-c(6,8,7,7.5,5,3.5,4,1,1)
z3<-c(3,2,4,7,3,4.5,6,2,3)
x1<-seq(1,9)
x2<-seq(1,9)
x3<-seq(10,18)
y1<-seq(8,0)
y2<--1*y1
2005 Dec 01
1
Error in structural equation model - "The model has negative degrees of freedom"
Hi
I am running a structural equation model with R using the sem command; am
getting the following error:
"Error in sem.default : The model has negative degrees of freedom = -4"
My model is as follows:
s_model = specify.model()
x1->m1, b1,NA
x2->m1, b2,NA
x3->m2, b3,NA
x4->m2, b4,NA
x5->m2, b5,NA
x6->m2, b6,NA
m1->y, a1,NA
m2->y, a2,NA
m1<->m1, v1,NA
2009 Apr 22
4
read.table or read.csv without row index?
Hello all,
Probably my concepts about the data.frame and matrix and array in R
are not clear, I need some clarification to help me understand them
better.
>M <- read.table("test1.csv",sep=",",row.names=NULL,header=T)
gives me: M as
M1 M2 M3 M4 M5 M6 M7 M8 M9 M10
1 9 11 14 15 18 20 20 20 20 20
2 3 4 8 9 11 12 14 15 15 15
3 4 5 8 8 9 9 9 9 9 9
4 4
2010 Jul 30
3
Using R for Multiple Regression
Hi,
Subject: Using R for Multiple Regression
I am new to statistic but am interested in applying mathematical models to
solve biological problems. I have used a linear model to generate the test
data. When using this data I expect R to correctly identify the model but
that does not seem to be the case. I am certain that I am doing something
wrong but not able to figure it out.
Model:
Y = m1x1 +
2008 Apr 21
1
Regression inclusion of variable, effect on coefficients
Hello dear R users!
I know this question is not strictly R-help, yet, maybe some of the guru's
in statistics can help me out.
I have a sample of data all from the same "population". Say my regression
equation is now this:
m1 <- lm(y ~ x1 + x2 + x3)
I also regress on
m2 <- lm(y ~ x1 + x2 + x3 + x4)
The thing is, that I want to study the effect of
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
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,
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)
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 <-
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:
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])] <-
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 <-
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
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]]