Displaying 20 results from an estimated 2000 matches similar to: "modelling a particular design"
2010 Feb 28
4
Reducing a matrix
I wish to rearrange the matrix, df, such that all there are not repeated x values. Particularly, for each value of x that is reated, the corresponded y value should fall under the appropriate column. For example, the x value 3 appears 4 times under the different columns of y, i.e. y1,y2,y3,y4. The output should be such that for the lone value of 3 selected for x, the corresponding row entries
2008 Dec 29
4
Merge or combine data frames with missing columns
Hi R-experts,
suppose I have a list with containing data frame elements:
[[1]]
(Intercept) y1 y2 y3 y4
-6.64 0.761 0.383 0.775 0.163
[[2]]
(Intercept) y2 y3
-3.858 0.854 0.834
Now I want to put them into ONE dataframe like this:
(Intercept) y1
2004 Feb 26
2
Structural Equation Model
Hello all!
I want to estimate parameters in a MIMIC model. I have one latent
variable (ksi), four reflexive indicators (y1, y2, y3 and y4) and four
formative indicators (x1, x2, x3, x4). Is there a way to do it in R? I
know there is the SEM library, but it seems not to be possible to
specify formative indicators, that is, observed exogenous variables
which causes the latent variable.
Thanks,
2008 Aug 13
1
summary.manova rank deficiency error + data
Dear R-users;
Previously I posted a question about the problem of rank deficiency in
summary.manova. As somebody suggested, I'm attaching a small part of
the data set.
#***************************************************
"test" <-
structure(.Data = list(structure(.Data = c(rep(1,3),rep(2,18),rep(3,10)),
levels = c("1", "2", "3"),
class =
2011 Aug 15
1
update() ignores object
Hi all,
I'm extracting the name of the term in a regression model that
dropterm specifies as the least significant one, and I'm assigning
this name to an object. However, when I use update(), it ignores this
object. Is there a way I can make it not ignore it? A reproducible
example is below:
> lm(x1~1+y1*y2+y3+y4,data=anscombe)->my.lm
>
2010 Jun 02
4
Draw text with a box surround in plot.
text() can draw text on a plot.
Do we have a way/function to draw text with a box surround it?
Thanks,
-james
2011 May 12
2
group length
Hi
I have four groups
y1=c(1.214,1.180,1.199)
y2=c(1.614,1.710,1.867,1.479)
y3=c(1.361,1.270,1.375,1.299)
y4=c(1.459,1.335)
Is there a function that can give me the length for each, like the made up
example below?
>function(length(y1:y2)
[1] 3 4 4 2
[[alternative HTML version deleted]]
2008 May 14
2
mfrow
Dear members,
I want to create 8 graphs and write it into one page using mfrow=c(4,2).
How to make all graphs (including the titles, legends, line types) to be
scale down (resized proportionally).
As an illustration, below is the code:
pdf("testmfrow.pdf")
par(mfrow=c(4,2))
x<-seq(1:10)
y1<-rnorm(10)
y2<-rnorm(10,mean=2,sd=1)
y3<-rnorm(10,mean=3,sd=1)
2006 Aug 29
2
lattice/xyplot: plotting 4 variables in two panels - can this be done?
Hi,
I would like to create a plot of y1,y2,y3,y4 against x for several subjects such that y1 and y2 are plotted against x in one panel and y3 and y4 against x in another panel. Thus if there are 3 subjects I should end up with 6 panels. Is there a simple way of doing so (i.e. without calling xyplot() several times, and then padding the results together)??
Regards
S?ren
2012 Mar 13
4
MANOVA and Extra Sums-of-Squares Tests
I would like to conduct an extra sum-of -squares test that compares a full
MANOVA model (with all 1st order interactions) to a reduced model (no
interactions) to determine if I can drop all interactions at the same time.
This is analagous to an extra sum-of-squares F-test in ANOVA, but instead
using MANOVA. Is there a command in R that does this? If not, is there a
command that calculates
1998 Nov 09
2
no subject (file transmission)
RNG in R and Splus 3.4
Prof. Ripley asked the details of the example.
We were doing parametric bootstrap, so it is similar to simulation.
Anyway here is the details.
We start with a sample of 19 positive numbers. We know the sample
is from truncated exp(0.3)...only the truncation point, theta, is unknown.
In other words, the sample can be generated from something like
x1 <- rexp(100,
1998 Nov 09
2
no subject (file transmission)
RNG in R and Splus 3.4
Prof. Ripley asked the details of the example.
We were doing parametric bootstrap, so it is similar to simulation.
Anyway here is the details.
We start with a sample of 19 positive numbers. We know the sample
is from truncated exp(0.3)...only the truncation point, theta, is unknown.
In other words, the sample can be generated from something like
x1 <- rexp(100,
[R-pkgs] New package: `lavaan' for latent variable analysis (including structural equation modeling)
2010 May 24
2
[R-pkgs] New package: `lavaan' for latent variable analysis (including structural equation modeling)
Hi Yves
lavaan looks like a very nice package. From the tutorial introduction
I see you create path diagrams for some of the models you describe.
How did you do this? I don't see a function for this in the package.
I know there is a path.diagram function in the sem package that uses
dot to draw the diagram, but I've always found the layouts from dot
somewhat strange for path diagrams
2017 Jul 16
3
Arranging column data to create plots
Dear All,
I need some help arranging data that was imported.
The imported data frame looks something like this (the actual file is huge, so this is example data)
DF:
IDKey X1 Y1 X2 Y2 X3 Y3 X4 Y4
Name1 21 15 25 10
Name2 15 18 35 24 27 45
Name3 17 21 30 22 15 40 32 55
I would like to create a new data frame with the following
NewDF:
IDKey X Y
Name1 21 15
Name1
2018 Feb 12
3
plotting the regression coefficients
Hi
After melt you can change levels of your factor variable. Again with the toy example.
> levels(temp$variable)
[1] "y1" "y2" "y3" "y4"
> levels(temp$variable) <- levels(temp$variable)[c(2,4,1,3)]
> levels(temp$variable)
[1] "y2" "y4" "y1" "y3"
>
And you will get graphs with this new levels ordering.
2006 Aug 10
2
index.cond in xyplot
Dear R-users
I have 5 dependent variables (y1 to y5) and one independent variable (x) and
3 conditioning variables (m, n, and 0). Each of the conditioning variables
has 2 levels. I created 2*4 panel plots.
xyplot(y1+y2+y3+y4+y5 ~ x | m*n*o,layout = c(4,2))
I would like to reorder the 8 panels. I tried to use index.cond (e.g.,
index.cond = list(c(1,3,2,4,5,7,6,8)) but it didn't work out.
2006 Jul 03
6
macro facility in R
R 2.2 on windows XP
I have a dataset with multiple columns. Some of the columns represent
independent variables, some represent dependent variables. I would like
to run the same analyses on a fixed set of independent variables,
changing only the dependent variable, e.g.
y1-y2=x1+x2+x3
y3-y4=x1+x2+x3
y5-y6=x1+x2+x3, etc.
I know I can write a function to perform the analyses, however in order
to
2008 Oct 10
1
Correlation among correlation matrices cor() - Interpretation
Hello,
If I have two correlation matrices (e.g. one for each of two treatments) and
then perform cor() on those two correlation matrices is this third
correlation matrix interpreted as the correlation between the two
treatments?
In my sample below I would interpret that the treatments are 0.28
correlated. Is this correct?
> var1<- c(.000000000008, .09, .1234, .5670008, .00110011002200,
2011 Jun 14
2
Need script to create new waypoint
Dear help-list members,
I am a student at Durham University (UK) conducting a PhD on spatial representation in baboons. Currently, I'm analysing the effect of sampling interval on home range calculations.
I have followed the baboons for 234 days in the field, each day is represented by about 1000 waypoints (x,y coordinates) recorded at irregular time intervals. Consecutive waypoints in
2017 Jul 16
0
Arranging column data to create plots
On Sat, 15 Jul 2017, Michael Reed via R-help wrote:
> Dear All,
>
> I need some help arranging data that was imported.
It would be helpful if you were to use dput to give us the sample data
since you say you have already imported it.
> The imported data frame looks something like this (the actual file is
> huge, so this is example data)
>
> DF:
> IDKey X1 Y1 X2 Y2