s-news
[Top] [All Lists]

lm function

To: <s-news@lists.biostat.wustl.edu>
Subject: lm function
From: "Pravin" <jadhavpr@vcu.edu>
Date: Wed, 21 Jan 2004 20:59:32 -0500
Importance: Normal

Hello

 

I am performing a linear regression on the dataset at hand. What am I doing wrong?

 

The following code

 

for (i in 1:ntrial*nsub)

            {

                        od.fit<-lm(ssi~time,data="">

                        coe<-matrix(od.fit$coe)

                        slp[i,]<-coe[2,]

            }

 

 

returns error as

>Problem: Subset selects 0 rows

Use traceback() to see the call stack

 

FYI,

 

ntrial= number of trials the data come from

nsub= number of subjects in all the studies

ssi is a dependent variable and “ssi.notM” is a dataframe. And, I am just interested in looking at slope of each individual in all the studies.

 

Thank you in anticipation,

 

Pravin

 

Pravin Jadhav

 

<Prev in Thread] Current Thread [Next in Thread>
  • lm function, Pravin <=