[R] GLM
Bill.Venables at csiro.au
Bill.Venables at csiro.au
Wed Feb 27 00:19:11 CET 2008
Just a couple of notes.
* What you are attempting to fit here is a linear model, or, more precisely 13112 simple linear regressions. Why not just use 'lm'? 'glm' is for fitting generalized linear models and using it for this special case is going to be computationally costly. [NB the concept of a 'general' linear model is foreign to R.]
* If ever you do manage to fit you 13112 simple linear regressions, what then?
* Since thery really are separate models, why not try doing it in smaller batches, the first 1000, the next 1000, and so on?
Bill Venables
CSIRO Laboratories
PO Box 120, Cleveland, 4163
AUSTRALIA
Office Phone (email preferred): +61 7 3826 7251
Fax (if absolutely necessary): +61 7 3826 7304
Mobile: +61 4 8819 4402
Home Phone: +61 7 3286 7700
mailto:Bill.Venables at csiro.au
http://www.cmis.csiro.au/bill.venables/
-----Original Message-----
From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] On Behalf Of Dani Valverde
Sent: Wednesday, 27 February 2008 3:11 AM
To: R Help
Subject: [R] GLM
Hello,
I am trying to perform a glm analysis on a 68x13113 matrix (named
data.spect). The first column corresponds to the predictor
(data.spect[,1]) and the rest to the response variables
(data.spect[,2:13113]). When I try this code
glmObject <- glm(data.spect[,2:13113]~data.spect[,1])
I get the following error:
Error: (subscript) logical subscript too long
Could anyone help me on solving this problem?
Best,
Dani
--
Daniel Valverde Saubí
Grup de Biologia Molecular de Llevats
Facultat de Veterinària de la Universitat Autònoma de Barcelona
Edifici V, Campus UAB
08193 Cerdanyola del Vallès- SPAIN
Centro de Investigación Biomédica en Red
en Bioingeniería, Biomateriales y
Nanomedicina (CIBER-BBN)
Grup d'Aplicacions Biomèdiques de la RMN
Facultat de Biociències
Universitat Autònoma de Barcelona
Edifici Cs, Campus UAB
08193 Cerdanyola del Vallès- SPAIN
+34 93 5814126
______________________________________________
R-help at r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
More information about the R-help
mailing list