search for: y5

Displaying 20 results from an estimated 96 matches for "y5".

2008 Aug 13
1
summary.manova rank deficiency error + data
...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 #**********************************************...
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...
2007 Nov 28
0
qestion on cmd scale
...s bounced with no further explanation. (1) Can I use covariance as my distance matrix? (2) Any good reference in this matter? (3) is the approach that I wrote below valid? Thank you, ilham Below is what I did: > y1 x y z [1,] 1 4 0 [2,] 2 5 -3 [3,] 3 6 -2 > y4 <- scale (y1) > y5<- cmdscale(dist(t(y4))) > plot (y5.x, y5.y, type="n", xlab="", ylab="", main="cmdscale(example)") > text(y5.x, y5.y, rownames(y5), cex=0.8) and I got the plot of x, y and z in 2-d graph. Q: Is this legitimate way to say re. the distance between one...
2008 May 14
2
mfrow
...hs (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 this title is to be scaled dow...
2008 Jan 25
1
Logit Regressions, Clustering etc
...rrying out some logit regressions and want to (a) make sure I'm taking the right approach and (b) work out how to carry out some additional analysis. So, to carry out a logit regression where the dependent variable is a factor db, I use something like: res1_l <- glm(formula = db ~ y1 + + y5, family = binomial(link = "logit")) summary(res1_l) ...which is, I hope correct. I also need to carry out an ordered logit regression. Is this as simple as: res1_l <- polr(formula = db ~ y1 + + y5) summary(res1_l) ..with db being a factor which has more levels than just "0&...
2012 Jul 31
2
help with a regression
Hello, I have a data frame with the following variables: ID, X1,X2,X3,X4,X5,Y1,Y2,Y3,Y4,Y5 and some other that do not matter, some of the X and Y can be missing (NA). I want to compute the slope of the linear regression Y ~ X for each subject, so using apply(DF,1,FUN,ra.rm=TRUE) now How do I define FUN? The X are different for each subject. Thanks for any help R.Heberto Ghezzo Ph.D. Mo...
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
2010 May 24
2
[R-pkgs] New package: `lavaan' for latent variable analysis (including structural equation modeling)
...; ## 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=PoliticalDemocracy) &gt...
2016 Apr 30
4
Removing NAs from dataframe (for use in Vioplot)
...mns off irregular length that contain NAs. I want to strip the NAs out and produce a multiple violin plot automatically labelled using the headers. At the moment I do this Code:? ds1 = read.csv("http://www.lecturematerials.co.uk/data/spelling.csv") library(vioplot) y6<-na.omit(ds1$y6) y5<-na.omit(ds1$y5) y4<-na.omit(ds1$y4) y3<-na.omit(ds1$y3) y2<-na.omit(ds1$y2) y1<-na.omit(ds1$y1) vioplot(y6, y5, y4,y3,y2,y1,horizontal=TRUE, names=c("Y6", "Y5","Y4","Y3","Y2","Y1"), col = "lightblue") Two querie...
2005 May 31
1
GLM question
...= eta (i,j) eta (i,j) = c + alpha(i) + beta(j) The y(i,j) are the response and they have no specified distribution. Here is what I did and I’m not getting the right results: > y1<-c(1,0,0,0,0) > y2<-c(1,0,0,1,0) > y3<-c(1,0,0,0,1) > y4<-c(1,1,0,0,0) > y5<-c(1,1,0,1,0) > y6<-c(1,0,1,0,0) > C<-matrix(nrow = 6, ncol = 5, byrow= TRUE) > C[1,]<-y1 > C[2,]<-y2 > C[3,]<-y3 > C[4,]<-y4 > C[5,]<-y5 > C[6,]<-x6 > m<-c(1,2,3,4,5,6) > Cdata<-data.frame(C[,1],C[,2],C[,3],C[,4...
2008 May 24
2
Importing data in text file into R
Dear all, I am quite new to R; facing certain problems: Say, I have a text file( named as "try"): Year C1 C2 C3 C4 C5 C6 Y1 3.5 13.8 9.5 6.8 0.4 24.2 Y2 3.8 13.9 9.9 7.6 0.7 12.8 Y3 4.5 14.5 14.2 9.2 0.6 14.5 Y4 5.9 16.2 24.6 12.7 0.2 24.3 Y5 7.2 20.4 40.6 18.2 0.8 28.2 Y6 5.9 18.6 37.4 14.5 0.3 36.9 Y7 8.0 16.1 88.6 24.1 0.1 34.6 Y8 13.6 21.1 56.3 19.0 0.7 33.3 I wish to import the file into R and make certain computations, like intercorrelation matrix. I tried the following syntax: # Inputting the data file (saved in text format) df...
2006 Jul 03
6
macro facility in 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 make the analyses easy to do, I really need a macro scripting language that will allow preprocessing of the function and substitution of macro variables with parameters passed to the macro, i.e. I need some...
2008 Nov 06
1
RMySql inserts \r when using dbWriteTable
..."), y = paste("y", 1:5, sep = "")) > dbWriteTable(conn, name= "myDF", value = myDFIn, row.names=F, append =TRUE, eol = "\r\n" ) [1] TRUE > myDFOut = dbReadTable(conn, "myDF") > print(myDFIn) x y 1 x1 y1 2 x2 y2 3 x3 y3 4 x4 y4 5 x5 y5 > print(myDFOut) x y 1 x1 y1\r 2 x2 y2\r 3 x3 y3\r 4 x4 y4\r 5 x5 y5\r Is there any way not to insert the "\r" in the database? I also get the same output, if I change the eol argument to "\n" in dbWriteTable, as in the following command. dbWriteTable(conn, name= &q...
2009 Apr 11
2
who happenly read these two paper Mohsen Pourahmadi (biometrika1999, 2000)
...,actually I should(I think) use a polynomial design matirx with level of 11,degree=3 here is my rocode~~ y1=c(1,0.9,0.98,1.06,0.83,1.00,0.41,0.93,1.01,0.86) y2=c(0.05,0.16,0,0.26,0.15,0.61,0.33,0.31,0.33) y3=c(-0.23,0,0.16,-0.03,0.22,-0.03,-0.17,-0.05) y4=c(0.04,-0.21,-0.04,-0.26,-0.03,-0.04,-0.05) y5=c(-0.02,-0.34,0.06,-0.22,-0.11,-0.31) y6=c(0.20,0.01,0.01,-0.26,0.01) y7=c(-0.06,-0.14,0.39,0.23) y8=c(0.21,0.10,0.09) y9=c(-0.24,-0.23) y10=c(0.13) y=c(y1,y2,y3,y4,y5,y6,y7,y8,y9,y10) ## autoregressive paramters ,table 1 biometrika 1999,page 685 om2=matrix(0,nrow=55,ncol=3) om1=poly(c(1:10),degree...
2012 Apr 10
1
cbind, data.frame | numeric to string?
...2 2 0.4 3 3 0.5 4 4 0.6 5 5 0.7 > Confirm that each variable is numeric: > is.numeric(test$a) [1] TRUE > is.numeric(test$b) [1] TRUE OK, so far so good. But, now I want to merge in a vector of characters: > c <- c('y1","y2","y3","y4","y5") Confirm that this is string: > is.numeric(c); [1] FALSE cbind c into the data frame: > test <- data.frame(cbind(a,b,c)) Looks like everything is in place: > test a b c 1 1 0.3 y1 2 2 0.4 y2 3 3 0.5 y3 4 4 0.6 y4 5 5 0.7 y5 Except that it seems as if the moment I cbin...
2012 Nov 19
3
Plot Area Dimensions
Dear colleagues, I wish to create a figure with 6 plots arranged vertically with no spacing between them as they all have a common x-axis. However, using the code below I'm unable to get the plot area the same size for each plot. The bottom plot with the x-axis label is smaller than the others, as is the top plot which has larger margins. How can I get the plot region the same size for
2008 Dec 02
3
sampling from data.frame
Hi all, I have a data frame with "clustered" rows as follows: Cu1 x1 y1 z1 ... Cu1 x2 y2 z2 ... Cu1 x3 y3 z3 ... # end of first cluster Cu1 Cu2 x4 y4 z4 ... Cu2 x5 y5 z5 Cu2 ... # end of second cluster Cu2 Cu3 ... ... "cluster"-size is 3 in the example above (rows making up a cluster are always consecutive). Is there any faster way to sample n clusters (with replacement) from this dataframe and build up a new data frame out of these samp...
2018 Feb 08
4
plotting the regression coefficients
...t variable (x) along the side and the phenotypes (y) across the top (as given below). For each data point, direction and magnitude of effect could be color and significance could be the size of the circle? Is this possible? I would greatly be appreciated your help. Thanks, Greg y1 y2 y3 y4 y5 y6 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 x16 x17 . . [[alternative HTML version deleted]]
2011 Aug 25
4
{R} How to extract correctly from vector?
...[1] "A1" "A2" "A3" "A4" "A5" "A6" "A7" "A8" "A9" "A10" Now assign each element as name for a data frame: (d <- data.frame(cbind(X1=1,Y1=1:10,X2=1,Y2=1:10,X3=1,Y3=1:10,X4=1,Y4=1:10,X5=1,Y5 =1:10, X6=1,Y6=1:10,X7=1,Y7=1:10,X8=1,Y8=1:10,X9=1,Y9=1:10,X10=1,Y10=1:10))) x <- paste("X",1,sep="") y <- paste("Y",1,sep="") for (i in 2:10) {x[i] <- paste("X",i,sep="") y[i] <- paste("Y",i,s...
2010 May 19
0
New package: `lavaan' for latent variable analysis (including structural equation modeling)
...below is the full R code for fitting 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=PoliticalDemocracy) summary(fit, fit.measures=TRUE) ## end R code ## Please feel...