search for: y4

Displaying 20 results from an estimated 169 matches for "y4".

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 with be 7 under column y1, 16 under column y2, 12 under column y3 and 18 under column y4. This should work for the other rows of x with repeated values. df x y1 y2 y3 y4 1 3 7 NA NA NA 2 3...
2011 Aug 15
1
update() ignores object
...ng 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 > rownames(dropterm(my.lm,test="F",sort=TRUE))[1]->my.object > my.object [1] "y1:y2" > update(my.lm,.~.-my.object) Call: lm(formula = x1 ~ y1 + y2 + y3 + y4 + y1:y2, data = anscombe) Coefficients: (Intercept) y1 y2...
2008 Aug 13
1
summary.manova rank deficiency error + data
...046,0.156354,0.126067, 0.105726,0.124713,0.126821,0.085584,0.093432,0.108858,0.157742,0.120533,0.141309,0.122595, 0.118340,0.153088,0.155897,0.183582,0.160975,0.181143,0.139314,0.186636,0.103449,0.116415,0.114275) ) ,names = c("GROUP", "Y1", "Y2", "Y3", "Y4","Y5") ,row.names = seq(1:31) ,class = "data.frame" ) summary(manova(cbind(Y1,Y2,Y3,Y4,Y5)~GROUP, test), test = "Wilks") #Error in summary.manova(manova(cbind(Y1, Y2, Y3, Y4, Y5) ~ GROUP, test), : residuals have rank 3 < 5 #*******************************...
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, Marcos
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 y2 y3 y4 1...
2015 Nov 21
0
[Aarch64 v2 08/18] Add Neon fixed-point implementation of xcorr_kernel.
...assert in the C code). + int16x4_t y0 = vld1_s16(y); + y += 4; + + for (j = 0; j + 8 <= len; j += 8) + { + // Load x[0...7] + int16x8_t xx = vld1q_s16(x); + int16x4_t x0 = vget_low_s16(xx); + int16x4_t x4 = vget_high_s16(xx); + // Load y[4...11] + int16x8_t yy = vld1q_s16(y); + int16x4_t y4 = vget_low_s16(yy); + int16x4_t y8 = vget_high_s16(yy); + int32x4_t a0 = vmlal_lane_s16(a, y0, x0, 0); + int32x4_t a1 = vmlal_lane_s16(a0, y4, x4, 0); + + int16x4_t y1 = vext_s16(y0, y4, 1); + int16x4_t y5 = vext_s16(y4, y8, 1); + int32x4_t a2 = vmlal_lane_s16(a1, y1, x0, 1); + int32x4_t a3...
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
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 to...
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
...=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) y4<-rnorm(10,mean=4,sd=1) y5<-rnorm(10,mean=5,sd=1) y6<-rnorm(10,mean=6,sd=1) y7<-rnorm(10,mean=7,sd=1) y8<-rnorm(10,mean=8,sd=1) plot(x,y1,type='o', lty=1, main="I want this title is to be scaled down (resized)") plot(x,y2,type='o', lty=2, main="I want t...
2011 Dec 19
1
Training parameters for a HMM
...To put it another way, lets say that I have the simple HMM topology that is shown here: http://en.wikipedia.org/wiki/File:HiddenMarkovModel.png And I have somehow collected datasets with observations and labelled hidden states: Sequence 1: Obs Hid y1 X1 y2 X2 y2 X2 y4 X1 ... ... y3 X3 ... Sequence N: Obs Hid y2 X1 y2 X2 y2 X1 y4 X1 ... ... y4 X1 I'm assuming categorial variables for y and x. I know I really am starting from from scratch here, so I'd be very grateful...
1998 Nov 09
2
no subject (file transmission)
...the bias of the max, using bootstrap. We did this: y1<-rexp(4000, rate=0.3) y2<- y1[y1<3.87058501] length(y2) # to make sure y2 is longer than 1900 or whatever..so we are not # recycling y3<-y2[1:1900] # now y3 contains 100 bootstrap samples of 19 each y4 <- matrix(y3, ncol=19, byrow=T) # actually some of students did # y4 <- t( matrix(y3, ncol=100) ) maxboot <- apply(y4, 1, max) biasboot <- mean(maxboot) - 3.87058501 We did this for more than 100 runs, depend how much memory you have on your machine,...
1998 Nov 09
2
no subject (file transmission)
...the bias of the max, using bootstrap. We did this: y1<-rexp(4000, rate=0.3) y2<- y1[y1<3.87058501] length(y2) # to make sure y2 is longer than 1900 or whatever..so we are not # recycling y3<-y2[1:1900] # now y3 contains 100 bootstrap samples of 19 each y4 <- matrix(y3, ncol=19, byrow=T) # actually some of students did # y4 <- t( matrix(y3, ncol=100) ) maxboot <- apply(y4, 1, max) biasboot <- mean(maxboot) - 3.87058501 We did this for more than 100 runs, depend how much memory you have on your machine,...
2010 May 24
2
[R-pkgs] New package: `lavaan' for latent variable analysis (including structural equation modeling)
...a SEM model: > > ## begin R Code ## > > library(lavaan) > > # The industrialization and Political Democracy Example > # Bollen (1989), page 332 > > model <- ' > # latent variable definitions > ind60 =~ x1 + x2 + x3 > dem60 =~ y1 + y2 + y3 + y4 > dem65 =~ y5 + y6 + y7 + y8 > > # regressions > dem60 ~ ind60 > dem65 ~ ind60 + dem60 > > # residual correlations > y1 ~~ y5 > y2 ~~ y4 + y6 > y3 ~~ y7 > y4 ~~ y8 > y6 ~~ y8 > ' > > fit <- sem(model, data=P...
2004 May 01
0
glm.nb and anova
Hi, I am trying to fit a negative binomial model with a number of parasite tapeworms as response variable to geographical coordinates (actually preparing a trend surface before kriging). When I try an anova, I get warnings: > glm4.nb<-glm.nb(wb~X4+Y4+I(X4^2)+I(Y4^2)) > anova(glm4.nb) Analysis of Deviance Table Model: Negative Binomial(0.0463), link: log Response: wb Terms added sequentially (first to last) Df Deviance Resid. Df Resid. Dev P(>|Chi|) NULL 344 225.7 X4 1 0.0 343...
2002 May 11
2
modelling a particular design
Dear R- and Omega-list-members, I am trying to make statistical inference about the following design: A dependent variable y has been measured multiple times, i.e. 4 times (y1,y2, y3, y4), unfortunately suffering from some successive dropouts (i.e. the sample sizes varies for y1, y2, y3, and y4). For every y, two other variables (covariates) were also measured: x & z, and both do presumably exert an effect on y. At some cutoffs, x can also be trichotomized into 3 ordinal levels...
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
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 25 10 Name2 15 18 Name2 35 24 Name2 27 45 Name3 17 21 Name3 30 22 Name3 15 40 Name3 32 55...
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. Cheers Petr From: greg holly [mailto:mak.hholly at gmail.com] Sent: Mond...
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. I got a error message "Error in cond.orders(foo) : Invalid value of index.cond". Please let me know if I didn't...