COMPGROUPS.NET | Search | Post Question | Groups | Stream | About | Register

### correlations when observations are not independant

• Email
• Follow

```I have a dataset with 100 cows, 10 days per cow and feeding time and
rumination time for each hour. We want to prove that feeding time of
each hour is highly correlated with rumination time in the next 2
hours, and therefore we can predict rumination time by measuring
feeding time. I have already created the dataset such as the feeding
time for each hour is matched with the rumination time 2 hours later,
in the same row.
However, I do not think I can just correlate or regress rumination
time to feeding time using the dataset as it is, with 100*10*24
observations, since observations are not independent!!! What should I
do?

Another question: I could run proc corr or prog reg, one coefficient
rsquare... Since I am not comparing models , and I have just 1
dependant and 1 independant variable, do I still have to report
adjusted rsquare? If I run proc corr, there will be not adjustment at
```
 0
Reply nchapinal (89) 7/12/2010 6:14:22 PM

See related articles to this posting

```On Jul 12, 11:14=A0am, nuria <nchapi...@yahoo.com> wrote:
> I have a dataset with 100 cows, 10 days per cow and feeding time and
> rumination time for each hour. We want to prove that feeding time of
> each hour is highly correlated with rumination time in the next 2
> hours, and therefore we can predict rumination time by measuring
> feeding time. I have already created the dataset such as the feeding
> time for each hour is matched with the rumination time 2 hours later,
> in the same row.
> However, I do not think I can just correlate or regress rumination
> time to feeding time using the dataset as it is, with 100*10*24
> observations, since observations are not independent!!! What should I
> do?
>
> Another question: I could run proc corr or prog reg, one coefficient
> rsquare... Since I am not comparing models , and I have just 1
> dependant and 1 independant variable, do I still have to report
> adjusted rsquare? If I run proc corr, there will be not adjustment at
> all...The non-adjusted indeed is higher...

if you're looking for correlations over time, check the autoreg
procedure.  You may need an additional correction if you're measuring
the same 10 cows over 10 days.

HTH,
Reeza
```
 0

1 Replies
372 Views

Similar Articles

12/11/2013 1:01:13 AM
page loaded in 40026 ms. (0)

Similar Artilces:

Correlation length and spatial correlation
Hi MATLABbers! I should have posted here ages ago, but apparently I enjoy getting tangled in knots. Many thanks in advance, and apologies for such a long post, but I wanted to really clarify what my problem is! Here's what I'm trying to do: 1. I have a vector field of velocities corresponding to the flow patterns in a population of kidney cells. The field is split into V_x and V_y in two different matrices. These matrices are often 100 x 100. 2. I would like to compute the *spatial* correlation length (correlation coefficient as a function of distance) within a single ...

Calculating cross-correlation from two auto-correlations
Hello, I have two autocorrelation sequences of unknown signals A and B, and need to calculate cross-correlation between these two. Is there any way t do that without performing spectral factorization? Thanks in advance. Tony On 27 Jun, 13:02, "karame83" <in_touch...@hotmail.com> wrote: > Hello, > > I have two autocorrelation sequences of unknown signals A and B, and I > need to calculate cross-correlation between these two. Is there any way to > do that without performing spectral factorization? You can't reconstruct the time domain sequence from its a...

select observation
Hi, I have 15 consecutive numeric variables,(q1, q2, .... q15). My objective is to list all observations for which any of the 15 varibles contains a numeric value "9". Below is the code I wrote, using PROC PRINT w/ WHERE statement. proc print data=test; where q1=9 or q2=9 or q3=9 or q4=9 or q5=9 or q6=9 or q7=9 or q8=9 or q9=9 or q10=9 or q11=9 or q12=9 or q13=9 or q14=9 or q15=9; run; My clumsy code works fine, but I wonder if there's a better way to achieve my objective. Thanks. Jerry Hi Jerry, *Untested* code: %MACRO Print9s; %LOCAL I; proc print data=test; wh...

Polyserial Correlation
Does anyone know if it is now possible to do a polyserial correlation in SAS? If so, do you have generic code you could share? Thank you. Melissa Melissa: The FREQ procedure: "PLCORR = requests the polychoric correlation coefficient. For 2�2 tables, this statistic is more commonly known as the tetrachoric correlation coefficient, and it is labeled as such in the displayed output. [...]" proc freq data=a; table b*c / plcorr; run; HTH, -- Agustin Calatroni -----Original Message----- From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Melissa J Sent: Monday, ...

correlation compute?
Hi!! I have to calculate the correlation between two signals. does someone know what is the difference between the functions xcorr and corrcoef? Thanks, Dori Dori wrote: > I have to calculate the correlation between two signals. > > does someone know what is the difference between the functions xcorr > and corrcoef? The 'corrcoef' function returns a correlation matrix. The 'xcorr' function returns a cross-correlation. Try 'help corrcoef' and 'help xcorr' for more on these specific functions. For information on correlation matrices, see: http...

correlation coefficient
Hi, I would like to get correlation coefficient that calculates obs 1~2, obs 1~3, obs 1~4, obs 1~5, obs 1~6 ... etc Thanks, db data input input date :mmddyy10. time :time8.0 stock1 stock2; format date:mmddyy10. time :time8.0; cards; 01/04/2010 7:00:00 5989.5 1115.25 01/04/2010 7:01:00 5998.5 1116 01/04/2010 7:01:00 5998.5 1116 01/04/2010 7:02:00 5996.5 1115.75 01/04/2010 7:05:00 6000 1115.5 01/04/2010 20:55:00 6042 1128.5 01/04/2010 20:56:00 6040.5 1128.5 01/04/2010 20:57:00 6040.5 1128.75 01/04/2010 20:58:00 6040.5 1128.5 01/04/2010 20:59:00 6040.5 1128.5 01/04/2010 ...

Independent processes
Hello, I have interfaced a 8 bit parallel data bus and a clock signal of the USB device to a CPLD. I need to store 32bits of data in a buffer. And then serially shift out the 32 bits. The loading of the data into the buffer can only be done by using the clock coming from the USB device because when USB generates data it generates clock with it. So I decided to use another clock to serial out the data. The problem is the handshaking between the USB process and the serial out process. The two processes have different clocks so the serial out process could miss the signal form the USB proces...

Independent Study
I have a question for the language experts, if they don't mind. I've been interested in language theory for quite some time, and I've done 'OK' in studying it on my own for the past year+ or so. I'm interested in generative programming, and one of the things I want to create in the future is a Compiler Compiler (of which I posted about here recently). Great goal, except there's a few things I don't yet know. One is how to automate state machine generation for regular expressions, I just haven't been able to get this part down (close, but not quite, certai...

Having thumbed through several books on neural networks, I've noticed the cascade-correlation algorithm doesn't get much lip service. Whenever it is mentioned, though, it's mentioned in a very favorable light (particularly with regard to training speed). Plus, "How many hidden nodes/layers?" is easily the most frequently asked question about neural nets I've seen. Having an algorithm that solves that problem on its own seems it'd be a Godsend. Finally, the algorithm has been around, what, 15 years? So what gives? Why aren't authors giving more att...

Correlation between random data...
I got to thinking (uh oh)... if we could somehow develop a system to bring correlation to random data, then we probably have a better chance of find a solution to compressing some of it. By correlation, I mean to take a complete file of randomly appearing data (which at the time... has no appearant relationship from one byte to the next) and make it so that we give releationships to EACH byte; therefore, if we change one... we change all the others (preserving the original state). To do this... we simply take the first byte and XOR with the second, second and XOR with the third, third and XO...

Correlation analysis of images
I have a plain image (eg. Lena) and its encrypted one.. I have to randomly select 2000 pairs of adjacent pixels from the plain image and encrypted image,and draw the distribution diagram of two horizontally, vertically, and diagonally adjacent pixels of the plain image and the encrypted image.. Can anyone help me out??? ...

processor independence layer????
any body thought of implementing a processor independent layer ?... like we have wine to emulate windows on linux...cant we emulate a processor??... i'm not talking about cheap assembly language simulators.. i'm talking about the real "processor" level independence.... cant we use a low-level virtual layer to encapsulate the processors.. like if we can put a mask b/w the motorolla processor instruction sets and the intel instruction sets... we could possibly run the intel codes on a motorolla machine.... many people go for the intel machine because of compactibility and avai...

Correlating SCSI Devices
We use Veritas Volume Manager and when I give the command 'vxdisk list' I find this entry: c6t1d0s2 sliced - - error What is the easiest way to correlate this entry or trace it to the physical device pathname shown in commands like prtconf and dmesg? jimruth@adelphia.net wrote: > We use Veritas Volume Manager and when I give the command 'vxdisk list' > I find this entry: > c6t1d0s2 sliced - - error > What is the easiest way to correlate this entry or trace it to the > physical device pathname shown in ...

Correlation with NaN values?
Hi all, I've a lot of data that has many NaN values. I've tried corrcoef but it won't work due to NaNs. Does anyone know of a solution a la nanmean etc that I could employ? Also is it possible to use some max-like function to highlight the row within a dataset that has the highest correlation? So I could then stream my results ie corr > 0.2 & < 0.4 in one result, then corr >0.4 & < 0.6 in the next and so on. Many thanks, Alex Alex Castelli wrote: > Hi all, > I've a lot of data that has many NaN values. I've tried corrcoef but > it won't w...

Bitshifting independant of signedness
Just wondering if bitwise operators pay any attention to the signedness of an integer type? Do they pay any attention to, or work any differently with, the sign-bit, or with a signed integer type? Let's take a hypothetical system where: (1) int is comprised of 32 value bits (inclusive of the sign-bit). (2) Two's complement is used. The bit-pattern for -18 on such a system is: 1111 1111 1111 1111 1111 1111 1110 1110 On such a system is the following *guaranteed* to work? #define VALBITS_INT 31 /* The above figure does NOT inlude the sign bit. */ int Minus18(...

Independent processes #2
Hello, I have interfaced a 8 bit parallel data bus and a clock signal of the USB device to a CPLD. I need to store 32bits of data in a buffer. And then serially shift out the 32 bits. The loading of the data into the buffer can only be done by using the clock coming from the USB device because when USB generates data it generates clock with it. So I decided to use another clock to serial out the data. The problem is the handshaking between the USB process and the serial out process. The two processes have different clocks so the serial out process could miss the signal form the USB process...

OT?: Yet another independent
Hello All, Well, I got laid off about three weeks ago and I thought that I would try working for myself. So, here it is three weeks later and so far so good! I've been relatively busy, not swamped but doing OK. This week has been slow, and I thought that I would make my first ever website. So... If some of you wouldn't mind, the next time your waiting for that Assembly to rebuild, would you please take a look at the site, and give any comments and criticisms. Please keep in mind that I know nothing about web design, so your comments will be very much appreciated. http://home.comcast....

correlated data/proc genmod
Hi all: I'm new to the group and hoping to get some advice on proc genmod which I a= m= using to analyze correlated data. Rather than multiple measurements per = patient over time, I have tests for multiple genotypes conducted at the sam= e= time. I am trying to model the probability of genotype1 being positive in Native = = Americans (vs all other races) while controlling for the presence of other = = related genotypes. Except for msmt (and id, of course), all variables are = = dichotomous (0,1). Each measurement is actually a test result for genotypes= = 2 through 4. ...

Sample Correlation Distance Implementation
I am trying to implement a function that computes the sample correlation distance between column vectors given as a matrix (pos). The function is supposed to return a distance matrix that shows the distances between every column vector pair in the matrix. I got the equation of the sample correlation distance from the statistics toolbox. You can take a look at it in the definition of the pdist function in the Matlab help. The code of my function is as follows: function d = corrdist(pos) [rows,cols] = size(pos); d = zeros(cols,cols); for i=1:cols for j=1:(i-1) d(i,j) = calc_distance(pos...

A policy-based observer pattern
Just for grins, I thought I'd refactor the observer pattern to make it more extensible. I used some of the writings from Martin Fowler and Andrei Alexandrescu as inspiration. It turned out to be a *really fun* exercise. I went down this one multiply-inherited recursively-templatized base class path that was just awful. I documented the adventure here: http://observer.dlma.com Warning: The library doesn't compile on Comeau. It does compile on my compiler (MSDev .NET 2003), though. Although I did this just for a lark, I'd be happy to integrate any fixes, and accept criticism...