similar to: Splitting data

Displaying 20 results from an estimated 3000 matches similar to: "Splitting data"

2005 Oct 05
1
(no subject)
hi all why does the following not work??? this was someone elses code and i couldnt explain why it doesn't work. m=matrix(c(0,0),2,1) v=matrix(c(1,0,0,1),2,2) Y=function(X1,X2,mu=m,V=v) { X=matrix(c(X1,X2),2,1) a=(1/((2*pi)*sqrt(det(V))))*exp((-0.5)*(t(X-mu)%*%solve(V)%*%(X-mu))) a[1] } x1=seq(-1,1) x2=x1 Z=outer(x1,x2,FUN="Y",mu=m,V=v) persp(x1,x2,Z) my code:
2007 Oct 16
1
simulation
I am trying to write a function that will simulate observed counts X and Y as below, I want the function to be able give many replicates, can somebody advise? thanks Oarabile #alpha,n sdx and sdy are constant, and N is a vector of length n. unstructured<-function(n,N,alpha,sdx,sdy){ Vx<-rnorm(n,mean=0,sd=sdx) Vy<-rnorm(n,mean=0,sd=sdy) thetax<-exp(alpha+Vx) thetay<-exp(alpha+Vy)
2003 Oct 28
2
Confidence ellipse for correlation
Hello, SAS' point and click interface has the option of produce a scatterplot with a superimposed confidence ellipse for the correlation coefficient. Since I generally like R so much better, I would like to reproduce this in R. I've been playing with the ellipse package. In order to have the points and the ellipse on the same graph I've done the following. (Load ellipse
2006 Nov 20
4
for help about logistic regression model
I have a dataset like this: p aa index x y z sdx sdy sdz delta as ms cur sc 1 821p MET 1 -5.09688 32.8830 -5.857620 1.478200 1.73998 0.825778 13.7883 126.91 92.37 -0.1320180 111.0990 2 821p THR 2 -4.07357 28.6881 -4.838430 0.597674 1.37860 1.165780 13.7207 64.09 50.72 -0.0977129 98.5319 3 821p GLU 3 -5.86733 30.4759
2008 Jul 06
3
Lots of huge matrices, for-loops, speed
Hello, we have 80 text files with matrices. Each matrix represents a map (rows for latitude and columns for longitude), the 80 maps represent steps in time. In addition, we have a vector x of length 80. We would like to compute a regression between matrices (response through time) and x and create maps representing coefficients, r2 etc. Problem: the 80 matrices are of the size 4000 x 3500 and we
2011 Nov 22
3
Binned line plot
I have a scatter plot with 10000 points.? I would like to add a line that bins every 50 points and connects the average of each bin.? I'm looking for something similar to line type "m" in Stata. With this dataset of 10000 points, I would also like to bin the data and make boxplots at certain intervals, so that I have a set of boxplots to represent each bin.? I would also like the
2010 Sep 17
1
multipath troubleshoot
Hi, My storage admin just assigned a Lun (fibre) to my server. Then re scanned using echo "1" > /sys/class/fc_host/host5/issue_lip echo "1" > /sys/class/fc_host/host6/issue_lip I can see the scsi device using dmesg But mpath device are not created for this LUN Pleas see below. The last 4 should be active and I think this is the problem Kernel:
2011 Apr 07
1
dotplot as a background for multiple barchart plots (with Lattice)
Hi R users, I'm kind stuck in my R experience... I want to have a multiple barchart with n windows, but with the same background for each window, and I want that background to be a recorded dotplot. First, is it possible ? If so, I guess I have to call a record plot in the panel function but how ? As there is no panel.plot and I can't use the recorded plot as an argument for the
2006 Apr 08
1
add lines to a plot with a loop without erase the last one
Hello, I want to plot several lines to a main plot but at the end of each loop, it erases the last one. Here my program: alpha<-5 beta<-10 var<-0.5 s<-runif(1000,0,50) m<-length(s) variancealpha<-0.002 variancebeta<-0.051 variancevar<-0.001 alphachap<-vector() betachap<-vector() varchap<-vector() epsilon<-vector() b<-vector()
2007 May 23
2
Fisher's r to z' transformation - help needed
I am trying to use Fisher's z' transformation of the Pearson's r but the standard error does not appear to be correct. I have simulated an example using the R code below. The z' data appears to have a reasonably normal distribution but the standard error given by the formula 1/sqrt(N-3) (from http://davidmlane.com/hyperstat/A98696.html) gives a different results than sd(z). Can
2011 Aug 12
2
recode Variable in dependence of values of two other variables
Hi, as an R-beginner, I have a recoding problem and hope you can help me: I am working on a SPSS dataset, which I loaded into R (load("C:/...) I have 2 existing Variables: "ID" and "X" , and one variable to be computed: meanX.dependID (=mean of X for all rows in which ID has the same value) ID = subject ID. Since it is a longitudinal dataset, there are repeated
2006 Jul 06
1
a question about glm( )
Hi, I am working on an example about generalized linear model in a paper using glm( ). The code is quite simple and straightforward, but the result is rediculous. The true parameter is c(4, -6), but the result is c(2.264774, -3.457114) Can anybody tell me the reason for this? Thanks a lot!!! Here is the code: g=function(t){exp(t)/(1+exp(t))} #the given link function n = 100 # sample size
2011 Mar 31
2
Controlling the order of /dev/sdX devices?
Hi CentOS 5.4(final) 2.6.18-164el5PAE. I am trying to prevent removable USB and eSATA devices from occupying /dev/sdX devices ahead of a 3ware RAID controller. For example: at boot, if a USB drive and eSATA HDD (connected to an LSI 1068E onboard controller, reflashed in "IT" mode to handle hotplug devices) were both present, they would occupy devices /dev/sdb and /dev/sdc, ahead of
2012 May 15
0
How to include known errors in a regression?
Hello all, I have a bunch of aggregated measurement data. The data describe two different physical properties that correlate, and I want to estimate the coefficients (slope and intercept) from the dataset. This is of course easy, I've done it, and I got the expected result. But here's the thing: Each data point in X and Y is actually a mean of N individual (automated) measurements taken
2010 May 27
2
Multipathing with Sun 7310
Dear list, we have a relatively new Sun Storage 7310, where we connect CentOS 5.5 Servers (IBM LS21/LS41 Blades) via Brocade Switches, 4GBit FC. The Blades boot from SAN via qla2xxx, and have no harddisks at all. We want them to use multipathing from the very beginning, so /boot and / are already seen by multipathd. Problem is, that the Sun 7310 has two storage heads which run in
2011 Aug 25
2
within-groups variance and between-groups variance
Hello, I have been looking for functions for calculating the within-groups variance and between-groups variance, for the case where you have several numerical variables describing samples from a number of groups. I didn't find such functions in R, so wrote my own versions myself (see below). I can calculate the within- and between-groups variance for the Sepal.length variable (iris[1]) in
2011 Dec 06
4
/dev/sda
We're just using Linux software RAID for the first time - RAID1, and the other day, a drive failed. We have a clone machine to play with, so it's not that critical, but.... I partitioned a replacement drive. On the clone, I marked the RAID partitions on /dev/sda failed, and remove, and pulled the drive. After several iterations, I waited a minute or two, until all messages had stopped,
2009 Aug 11
3
Lattice: How to do error bars
I am trying to add 2 stdev error bars to lattice type plots: panel.ebar<-function(x,y,dy=NULL,...) { panel.xyplot(x,y,...) panel.segments(x,y-dy,x,y+dy,...) } Then: xyplot(y~x|fc,data=dat,dy=dat$dy,panel=panel.ebar) This adds error bars but they are not conditioned on the factor fc. xyplot(y+I(y-dy)+I(y+dy)~x|fc,data=dat) This produces 3 series of points in different colors, conditioned
2010 Jun 09
2
software raid - better management advice needed
Hi, I've used mdadm for years now to manage software raids. The task of using fdisk to first create partitions on a spare drive sitting on a shelf (raid 0 were my 1st of 2 drives failed) is kind of bugging me now. After using fdisk to create the same partition layout on the new drive as is on the existing drive and then using mdadm to finish every thing up is a little tedious. Any
2008 Apr 11
2
How to fill out some columns?
Dear R users, I'm working with 2 data sets which look like (for example) dx and dy in the next code: # Seed set.seed(4) # First data frame dx=matrix(rnorm(6*5),ncol=6) colnames(dx)=LETTERS[1:6] # Second data frame dy=matrix(rnorm(3*5),ncol=3) colnames(dy)=c('A','C','E') As you will notice, some columns in both data sets have the same names. At the end, what I need