Skip to content
Back to formatted view

Raw Message

Message-ID: <1620.143.107.219.61.1236341234.squirrel@carpa.ciagri.usp.br>
Date: 2009-03-06T12:07:14Z
From: Sueli Rodrigues
Subject: Linear Regression

Hi, I have the following file, and I need to work out the linear
regression for each sample. I tried the model(*) and receive the error
message (**):
> data=split(mydata,rep(1:(nrow(mydata)/6),each=6))
> arrang.linear=lapply(data,lm,formula=KA~PA)
Erro em storage.mode(y) <- "double" :
  invalid to change the storage mode of a factor
Al?m disso: Warning message:
In model.response(mf, "numeric") :
  using type="numeric" with a factor response will be ignored

SAMPLE	PA	KA
2	0.917	11.261
2	0.823	11.010
2	0.803	10.381
2	0.744	10.208
2	0.697	10.006
2	0.681	9.916
3	0.789	10.271
3	0.702	10.076
3	0.692	9.990
3	0.646	9.779
3	0.620	9.749
3	0.608	9.708
4	1.052	11.779
4	0.941	11.249
4	0.881	10.140
4	0.824	10.052
4	0.790	9.859
.         .       .
.         .       .
.         .       .
80      0.499   9.819

Sueli Rodrigues

Eng. Agr?noma - UNESP
Mestranda - USP/ESALQ
PPG-Solos e Nutri??o de Plantas
Fones (19)93442981
      (19)33719762