[R] how to get the p-values from an lm function ?

2007-07-12 Thread Benoit Chemineau
Hi, dear R-users, I am computing a liner regression by rating category using the 'by' function as stated below: tmp - by(projet, rating, function(x) lm(defaults ~ CGDP+CSAVE+SP500, data = x)) I would like to get not only the coefficients but also their p-values. I can't find the command in the

[R] how to get the position of an element in a vector ?

2007-07-03 Thread Benoit Chemineau
Hi, dear R developers, I've got a vector of monthly volatilities and i would like to get the position of the highest volatility of the vector without computing a loop. Is there a function that could give me such a result ? a-c(1,2,4,100,3) the highest value is the fourth of the vector. how can

[R] how to compute a garch model with t innovations ?

2007-06-15 Thread Benoit Chemineau
Hi, dear R users, I'm a new user of R and especially in time series modelling. I would like to know how to compute arch/garch model using innovations that are not normally distributed (Student / swew-Student distriibuted). The *garch* function in the time series fits a Generalized Autoregressive

[R] white test to check homoscedasticity of the residuals

2007-05-30 Thread Benoit Chemineau
Hi R-programmers, I can't find find the White test to check the homoscedasticity of the residuals from a linear model. Could you please help me with this? Thank you ! BC [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch

[R] monthly least squares estimation

2007-05-28 Thread Benoit Chemineau
Hi R-programmers ! I would like to perform a linear model regression month by month using the 'lm' function and i don't know how to do it. The data is organised as below: Month ExcessReturn Return STO 8 0.047595875 0.05274292 0.854352503 8 0.016134874 0.049226941 4.399372005 8

[R] linear model by month

2007-05-28 Thread Benoit Chemineau
Hi R-programmers ! I would like to perform a linear model regressio using the 'lm' function and i don't know how to do it. The data is organised as below: Month ExcessReturn Return STO 8 0.047595875 0.05274292 0.854352503 8 0.016134874 0.049226941 4.399372005 8 -0.000443869

[R] basic problem but can't solve it

2007-05-22 Thread Benoit Chemineau
Hello, I have a basic problem but i can't figure it out with the table underneath. I would like to compute monthly averages. I would like to have the average measure for month #5 for the first three rows (the same number in the first three lines) and the average measure for month #6 for the