Displaying 20 results from an estimated 10000 matches similar to: "Plotting 1 covariate, 3 factors"
2011 Feb 14
4
sem problem - did not converge
Someone can help me? I tried several things and always don't converge
# Model
library(sem)
dados40.cov <- cov(dados40,method="spearman")
model.dados40 <- specify.model()
F1 -> Item11, lam11, NA
F1 -> Item31, lam31, NA
F1 -> Item36, lam36, NA
F1 -> Item54, lam54, NA
F1 -> Item63, lam63, NA
F1 -> Item65, lam55, NA
F1 -> Item67, lam67, NA
F1 ->
2007 Dec 06
1
updating a helper function in a R package
Hi list,
Sorry for the vague title, but here is the scenario.
I?m writing an R package, let?s say, ?pkg1?, which contains 3 functions: f1, f2, f3. f2 and f3 are helper functions for f1, i.e. f1 calls f2 which in turn calls f3.
f1 <- function(?) {
?.
f2()
?
}
f2 <- function(?){
?
f3(?)
?
}
f3 <- function(...){
....
}
Then, I wrote a new version of f3 and I want to
2011 Jun 01
3
error in model specification for cfa with lavaan-package
Dear R-List,
(I am not sure whether this list is the right place for my question...)
I have a dataframe df.cfa
2011 Apr 12
4
1 continuous non-normal variable ~ 4 factors + 1 continuous covariate (with interactions)
Hello
Im struggling on something... I have one continuous variable (A), and I need
to explain it with 4 factors, and maybe one continuous covariate.
And of course, my variable A is not normal at all (it's a duration in
seconds, whole numbers).
What can I do? I would know how do deal with it if I had one factor, maybe
two, but in that case Im really not sure what I am supposed to do to
2012 Nov 19
2
Performing gage R&R study in R w/more than 2 factors
Hi everyone,
I'm fairly new to R, and I don't have a background in statistics, so
please bear with me. ;-)
I'm dealing with 2^k factorial designs, and I was just wondering if
there's any way to analyze more than two factors of a gage R&R study in
R. For example, Minitab has an "expanded gage R&R" function that lets
you include up to eight additional factors
2012 Jul 11
2
[LLVMdev] [NVPTX] llc -march=nvptx64 -mcpu=sm_20 generates invalid zero align for device function params
Hello,
FYI, this is a bug http://llvm.org/bugs/show_bug.cgi?id=13324
When compiling the following code for sm_20, func params are by some reason
given with .align 0, which is invalid. Problem does not occur if compiled
for sm_10.
> cat test.ll
; ModuleID = '__kernelgen_main_module'
target datalayout = "e-p:64:64-i64:64:64-f64:64:64-n1:8:16:32:64"
target triple =
2003 Jun 23
3
right assignment ("->") and functions
Hi everyone
check this out [R-1.7.0]:
R> f1 <- function(x){x^2}
R> f1 -> f2
R> f2(4)
[1] 16
R>
R> function(x){x^2} -> f3
function(x){x^2} -> f3
R> f3(4)
Error: couldn't find function "f3"
Why does right assignment "->" work in the first but not the second
case? Can anyone else reproduce this?
--
Robin Hankin, Lecturer,
School of
2009 Jul 15
4
Extract pairs (rowname, columname) from a matrix where value is 0
Dear sir,
I have a matrix like
a<-matrix(c(0,2,0,4,0,6,5,8,0),nrow=3)
colnames(a)<-c("F1","F2","F3")
rownames(a)<-c("A1","A2","A3")
a
F1 F2 F3
A1 0 4 5
A2 2 0 8
A3 0 6 0
I want to extract all pairs (rownames, columnames) from which the value in
the matrix is 0
The result should be something like this
A1, F1
A2,
2008 Jun 24
4
Find max of a row in data frame (like Excel)
Hi,
Here's the data we have:
> rs[1:5,]
probe_id f1 f2 f3 f4 M A f
1 A_68_P20002076 2 58 0 0 1.51778114 6.344453 59
2 A_68_P20002775 22 8 15 0 0.43419304 5.488819 59
3 A_68_P20005791 43 3 0 0 0.05698666 9.830594 59
4 A_68_P20005805 11 34 0 0 1.71076835 6.624038 59
5 A_68_P20006729 16 44 0 0 0.85498261 6.044229 59
I want rs$f be the max of f1, f2, f3,
2006 Mar 30
2
Plotting a segmented function
This might be a trivial question, but I would appreciate if anybody
could suggest an elegant way of plotting a function such as the
following (a simple distribution function):
F(x) = 0 if x<=0
=(x^2)/2 if 0<x<=1
=2x-((x^2)/2)-1 if 1<x<=2
=1 if x>2
This is just an example. In this case it is a continuous function. But
how to do it in general in an elegant way.
2003 Jul 18
3
Problem indexing into array
Hi Folks,
Can anyone give me the tip I've been groping for with the
following question:?
mu: kx2x2x2 array of reals corresponding to means of k RVs
at the combinations of values (1,2)x(1,2)x(1,2)
of dichotomous variables F1,F2,F3
mu prints out as k rows (one for each Xi) of 8 numbers
M: N x (3+k) matrix of cases. The first 3 cols are values
of
2007 Apr 11
2
sem is not "taking" the model
A strange problem with sem:
I downloaded the sem library and then, I specified my simple measurement model (below). I highlighted it and ran it. It ran, but it did NOT tell me "22 lines read". And nothing works after that - it looks like it runs, but it does not produce anything...
Did I make a mistake somewhere in the model? (notice, TIME has only 1 indicator - t1, and I fixed t1's
2007 Apr 09
3
sem vs. LISREL: sem fails
I am new to R.
I just tried to recreate in R (using sem package and the identical input data) a solution for a simple measurment model I have found before in LISREL. LISREL had no problems and converged in just 3 iterations.
In sem, I got no solution, just the warning message:
"Could not compute QR decomposition of Hessian.
Optimization probably did not converge.
in: sem.default(ram =
2007 Apr 11
1
creating a path diagram in sem
Hello,
I finally run my measurement model in sem - successfully. Now, I am trying to print out the path diagram that is based on the results - but for some reason it's not working. Below is my script - but the problem is probably in my very last line:
# ANALYSIS OF ANXIETY, DEPRESSION, AND FEAR - LISREL P.31
library(sem)
# Creating the ANXIETY, DEPRESSION, AND FEAR intercorrelation matrix
2009 Aug 13
1
Adding logical vectors
When adding several logical vectors I expect each vector will be
coerced to integers and these vectors will then be added.
That doesn't always seem to be the case.
For example:
> ( f1 <- as.factor ( sample ( "x" , 25 , rep = T ) ) )
[1] x x x x x x x x x x x x x x x x x x x x x x x x x
Levels: x
> ( f2 <- as.factor ( sample ( "y" , 25 , rep = T ) ) )
2009 Sep 19
2
Counting observations of a combined factor
#I have a dataset with two factor. I want to combine those factors into
a single factor and count the number of data values for each new factor.
The following gives a comparable dataframe:
a <- rep(c("a", "b"), c(6,6))
b <- rep(c("c", "d"), c(6,6))
df <- data.frame(f1=a, f2=b, d=rnorm(12))
df
# I use the 'interaction' function to combine
2005 Mar 18
1
slow computation of mixed ANOVA using aov
Dear R-help list,
I am trying to do a mixed ANOVA on a 8960 x 5 dataframe. I have 3 factors
for which I want to test all main effects and interactions : f1 (40 levels),
f2 (7 levels), and f3 (4 levels). I also have a subject factor, subject, and
a dependent variable, dv.
Some more information about the factors:
f2 is a between-subject factor. That is, for each level of f2 there are 8
nested
2009 Jul 01
1
How should I denormalise a data frame list of lists column?
Hi,
I have a data frame where one column is a list of lists. I would like to
subset the data frame based on membership of the lists in that column and be
able to 'denormalise' the data frame so that a row is duplicated for each of
its list elements. Example code follows:
# The data is read in in this form with the c2 list values in single strings
which I then split to give lists:
> f1
2008 Nov 10
1
Remove empty levels in subset
Hi,
when I use use subset in a data.frame, all empty levels are maintained in
the new table.
> test <-
data.frame(a=as.factor(rep(c("f1","f2","f3"),10)),b=rep(c(1,2,3),10))
> summary(test)
a b
f1:10 Min. :1
f2:10 1st Qu.:1
f3:10 Median :2
Mean :2
3rd Qu.:3
Max. :3
> test2 <-
2005 Mar 29
3
From FAQ 7.21 to a command like apply(sapply(list(f1,f2,f3),is.na),2,sum)
Dear all,
Last December there was a thread regarding the famous FAQ 7.21 "How can I
turn a string into a variable?" and asking what people want to do with
these strings.
My, certainly trivial application would be as follows:
Assume I have a data.frame containing besides others also the columns f1,
f2, ..., fn and I want to create a command like:
apply(sapply(list(f1,f2,f3),is.na),2,sum)