[R] Extracting 'SOME' values from a linear model.

David Winsemius dwinsemius at comcast.net
Fri Apr 2 23:27:38 CEST 2010


On Apr 2, 2010, at 5:14 PM, HouseBandit wrote:

>
> I have a regression model that I have used on some data and to look  
> at its
> accuracy compared to some other models I have been extracting the  
> same 10%
> of the real data to perform a sum of squares calculation
>
> this is what I have tried but it gives me the '0.9*length(t)' fitted  
> value
> and the 'length(t)' fitted value that I want, but it doesnt give me  
> those in
> between.
>
> my.lm
> my.lm$fitted[]

That would index exactly 2 numbers. What was your goal? Try just this  
at your console:

c(0.9*length(t), length(t) )

You may want to look at:

?sample

-- 
David Winsemius, MD
West Hartford, CT



More information about the R-help mailing list