Displaying 2 results from an estimated 2 matches for "coeff1".
Did you mean:
coef1
2011 Jul 07
3
coefficients lm of data.frame
...333 0.22168589
10 0.25196536 0.84619914
11 -0.59536986 -0.08243074
12 1.09115054 0.49822977
I need to add two columns as result of the fitting of linear model
based on a preset numbers of row.
For example if I need to compute a lm each 4 rows, I get the
data.frame below, where intercept1 and coeff1 is obtained from V1 and
V2 of first 4 rows lm(V2 ~ V1), and so on...
V1 V2 "intercept" "coeff"
1 0.6931694 0.05797771 intercept1 coeff1
2 -1.4069786 0.23983307 intercept1 coeff1
3 -1.4901708 0.45079601 intercept1 coeff1
4 0.2215696 1.8788898...
2009 Sep 21
2
Combine vectors in order to form matrixes with combn
...make a simple combination where, instead of scalars, i
would like to combine vector, in order to form matrixes.
In other
words, i have nineteen 6-items vectors (for example coef1-coef19), that
i would like to combine in n!/k!(n-k)! 6x6 matrixes.
I tried with a
code like this
mma <- combn(c(coeff1,coeff2,...,coeff19),function(x)
matrix(x,6,6))
but i think that R doesn't recognize that these are not
scalars. In fact the error is:
Errore in matrix(r, nrow = len.r, ncol
= count) :
invalid 'ncol' value (too large or NA)
Inoltre: Warning
message:
In combn(c(coeff1, coeff2, coef...