Re: [R] vars package - irf() does not work

2017-02-24 Thread T.Riedle
. From: R-help <r-help-boun...@r-project.org> on behalf of John Dougherty <j...@surewest.net> Sent: 24 February 2017 00:46 To: r-help@r-project.org Subject: Re: [R] vars package - irf() does not work On Wed, 22 Feb 2017 09:57:00 +0000 "T.Riedle" <tr...@kent.

[R] vars package - irf() does not work

2017-02-22 Thread T.Riedle
Dear all, I have not received any response on this email. Is there anybody who can help me? I want to run an impulse response analysis using the vars() package. The code looks as follwows. # list of class varest varest.USA<-VAR(VAR_analsis_DataUSA, lag.max = 24, ic = "SC", type = "both")

[R] vars package - irf() does not work

2017-02-20 Thread T.Riedle
Dear all, I want to run an impulse response analysis using the vars() package. The code looks as follwows. # list of class varest varest.USA<-VAR(VAR_analsis_DataUSA, lag.max = 24, ic = "SC", type = "both") varest.USA summary(varest.USA) #Run irf analysis irf.USAg<-irf(varest.USA,

[R] lmtest package - Difference between vcov and vcov.

2017-02-19 Thread T.Riedle
Dear all, I want to run a regression using coeftest() in combination with the waldtest() function from the lmtest package. I am confused about the argument vcov. The coeftest uses vcov. whereas according to the manual waldtest uses vcov and I am not sure about the difference between vcov. in

[R] irf in vars package

2017-02-19 Thread T.Riedle
Dear all, I am trying to replicate the Canada example in the vars vignette. Unfortunately, the irf() does not work. R returns following error: unused arguments (response = "U", n.ahead = 48, boot = TRUE) Why is the example not working? [[alternative HTML version deleted]]

[R] coeftest() R squared

2017-02-14 Thread T.Riedle
Dear all, I want to run a regression using lm() with Newey West corrected standard errors. This is the code Reg<-lm(g~sent + liquidity + Cape, data=dataUsa) CoefNW<-coeftest(Reg, vcov.=NeweyWest) CoefNW In contrast to summary(Reg) the output of CoefNW neither returns the adjusted R squared

[R] Cannot open MTS package

2017-01-25 Thread T.Riedle
Dear all, I am trying to download MTS package but when I call it using library() I get the error below. I have already installed the Rcpp package. What is wrong? What must I do to open the MTS package? Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) : there is no

[R] Cannot open MTS package

2017-01-24 Thread T.Riedle
Dear all, I am trying to download MTS package but when I call it using library() I get the error below. I have already installed the Rcpp package. What is wrong? What must I do to open the MTS package? Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) : there is no

Re: [R] Granger-causality test using vars package

2017-01-23 Thread T.Riedle
anger-causes e, U and rw, respectively i.e. how can I determine that prod Granger-causes e, U and rw? Thanks for your support in advance. ____ From: Pfaff, Bernhard Dr. <bernhard_pf...@fra.invesco.com> Sent: 23 January 2017 09:12 To: T.Riedle; R-help@r-project.org Subject: AW: [R] Gran

[R] Granger-causality test using vars package

2017-01-22 Thread T.Riedle
Dear R-users, I am trying to compute the test statistics for Granger-causality for a VAR(p) model using the "vars" package. I simply used the example proposed by the vars vignette and added the code for the Granger-causality. The code looks as follows library(vars) Canada<-Canada[,

[R] prcomp() on correlation matrix

2016-11-09 Thread T.Riedle
Dear R users, I am trying to do a Principal Components Analysis using the prcomp() function based on the correlation matrix. How can I determine to calculate PCA on a correlation or covariance matrix using prcomp()? Thanks in advance. [[alternative HTML version deleted]]

Re: [R] Return.clean () - PerformanceAnalytics package

2016-10-15 Thread T.Riedle
; Sent: 15 October 2016 11:06 To: T.Riedle Cc: R-help@r-project.org Subject: Re: [R] Return.clean () - PerformanceAnalytics package Hi T, Have you tried converting "clearntest" or "data" into a time series? Jim On Sat, Oct 15, 2016 at 4:47 AM, T.Riedle <tr...@kent.ac.uk

[R] Return.clean () - PerformanceAnalytics package

2016-10-14 Thread T.Riedle
Dear all, I am trying to clean return data using the Return.clean() function in the PerformanceAnalytics package. Hence, my code looks as follows but I get an error message. cleantest <- read.csv("D:/Studie_vola_difference/cleantest.csv") data<-as.vector(cleantest)

[R] Cannot install package write.xls

2016-10-07 Thread T.Riedle
Dear R users, I am trying to export my results to excel using write.xls or write.table but I cannot install the packages. Instead, I get the message Warning in install.packages : package 'write.table' is not available (for R version 3.3.1) What can I do? [[alternative

[R] prcomp(): How do I multiply two matrices

2016-10-07 Thread T.Riedle
Dear R-users, I am trying to do a principal components analysis using the attached data. My code looks as follows. I want to calculate the time series of the principal components (PC) . To this end, I transform the coefficients and the data into matrices and employ a matrix multiplication but

[R] source code of a function

2016-07-08 Thread T.Riedle
Dear all, I am currently working with the "jvnVaR" package and I need to explain the assumptions behind the function jVaR(). Is there a function in R which calls the code behind a function? Kindest regards [[alternative HTML version deleted]]

[R] Calculating Value at Risk

2016-06-28 Thread T.Riedle
Dear all, As I am working on Value at Risk, I am looking for an appropriate package to calculate Value at Risk using different methods beyond the historical method. In doing so, I have found the package jvnVaR which provides several methods to calculate VaR. Nevertheless, I am interested in

[R] Error using function seas()

2016-06-25 Thread T.Riedle
Dear all, I am trying to run the seas() function. If I run the seas() function as shown below I get following errors. What is wrong with my code? > data<-Shiller_data[,2] > ts<-ts(data,start=c(1871, 01), end=c(2015, 12), frequency=12) > ts Jan Feb Mar Apr May

[R] How to use seas()

2016-06-24 Thread T.Riedle
Dear all, I am trying to run the seas() function. In doing so, I need an object of class "ts". I tried to generate an ts object using the ts() function but it does not work. Does anyone have an idea how to generate an ts object. In addition, I get the error that there are too many observations

Re: [R] extracting coefficients from ar() output

2016-06-17 Thread T.Riedle
frames, a data frame object, a list object of data frames. -Original Message- From: David Winsemius [mailto:dwinsem...@comcast.net] Sent: 17 June 2016 19:27 To: T.Riedle Cc: peter dalgaard; R-help@r-project.org Subject: Re: [R] extracting coefficients from ar() output > On Jun 17,

Re: [R] extracting coefficients from ar() output

2016-06-17 Thread T.Riedle
quot;R.xls", SheetNames = test) Unfortunately, it doesn't work. How can I export the data to Excel? -Original Message- From: peter dalgaard [mailto:pda...@gmail.com] Sent: 16 June 2016 18:49 To: William Dunlap Cc: T.Riedle; R-help@r-project.org Subject: Re: [R] extracting coeffic

[R] extracting coefficients from ar() output

2016-06-16 Thread T.Riedle
Hi everybody, I am trying to run an AR1 model using the ar() function as shown below. > rollingarma<-rollapply(data,width=36,function(data) ar(data,aic=TRUE)) > head(rollingarma,50) order arvar.pred x.mean aicn.used order.max partialacf resid methodseries

[R] AR1 model using ARIMA

2016-06-14 Thread T.Riedle
Sorry, I forgot to attach the file. Dear R users, I have not received any help regarding my problem. The rolling window AR1 model returns an error if I run my code as follows: data<-GSDAF[,2] rollingarma<-rollapply(data,width=36,function(data)

[R] AR1 model using ARIMA

2016-06-14 Thread T.Riedle
Dear R users, I have not received any help regarding my problem. The rolling window AR1 model returns an error if I run my code as follows: rollingarma<-rollapply(data,width=36,function(data) coef(arima(data,order=c(1,0,0 Error in arima(data, order = c(1, 0, 0)) : non-stationary AR part

[R] AR1 model using ARIMA

2016-06-11 Thread T.Riedle
Dear R users, I am trying to run a rolling window AR1 model by combining the rollapply() with the arima() function. Hence, my code looks as follows: rollingarma<-rollapply(data,width=36,function(data) coef(arima(data,order=c(1,0,0 Error in arima(data, order = c(1, 0, 0)) : non-stationary

Re: [R] sandwich package: HAC estimators

2016-06-01 Thread T.Riedle
mmand. Which weights does this command apply, which bandwith and which kernel? Kind regards ____ From: Achim Zeileis <achim.zeil...@uibk.ac.at> Sent: 31 May 2016 17:19 To: T.Riedle Cc: r-help@r-project.org Subject: Re: [R] sandwich package: HAC estimators O

Re: [R] sandwich package: HAC estimators

2016-05-31 Thread T.Riedle
git into the waldtest() function. Does that work to get chi2 under HAC standard errors? From: Achim Zeileis <achim.zeil...@uibk.ac.at> Sent: 31 May 2016 13:18 To: T.Riedle Cc: r-help@r-project.org Subject: Re: [R] sandwich package: HAC estimators On Tue, 31

Re: [R] sandwich package: HAC estimators

2016-05-31 Thread T.Riedle
r-help@r-project.org Subject: Re: [R] sandwich package: HAC estimators On Mon, 30 May 2016, Leonardo Ferreira Fontenelle wrote: > Em Sáb 28 mai. 2016, às 15:50, Achim Zeileis escreveu: >> On Sat, 28 May 2016, T.Riedle wrote: >> > I thought it would be useful to incorpo

[R] zelig package: robust SE

2016-05-29 Thread T.Riedle
Dear R users, I am trying to run a logistic regression using zelig. The simple logistic regression works well but now I want to have HAC robust standard errors. I have read in the manual that there is an option called "robust" and that zelig() computes robust SE via the sandwich package.

[R] sandwich package: HAC estimators

2016-05-28 Thread T.Riedle
Dear R users, I am running a logistic regression using the rms package and the code looks as follows: crisis_bubble4<-lrm(stock.market.crash~crash.MA+bubble.MA+MP.MA+UTS.MA+UPR.MA+PPI.MA+RV.MA,data=Data_logitregression_movingaverage) Now, I would like to calculate HAC robust standard errors

[R] Fw: Generating 3Dplot in lattice package

2016-05-03 Thread T.Riedle
20:04 To: T.Riedle Cc: r-help@r-project.org Subject: Re: [R] Generating 3Dplot in lattice package For starters, use 'pmin' (parallel min) instead of 'min'. substitute(MIN(psi/K14,EXP(((ABS(H14)/peak)^omega)*LN(psi/K14))), list(MIN=quote(pmin), K14=quote(VaR), ABS=quote(abs), EXP=quo

[R] Backtesting VaR using rugarch package

2016-05-02 Thread T.Riedle
Dear R users, I am trying to backtest VaR using the rugarch package. My code looks as follows VaRTest(alpha=0.025,Backtesting_BuVaR$Log.return,Backtesting_BuVaR$VaR,conf.level = 0.975) R returns following output. I don't understand why I get NAs except for the critical values. Does anyone have

[R] Generating 3Dplot in lattice package

2016-05-02 Thread T.Riedle
Dear R users, I am trying to generate a 3D plot using the wireframe() function in the lattice package. The corresponding formula in Excel looks as follows and is applied to the wireframe() function: MIN(psi/K14,EXP(((ABS(H14)/peak)^omega)*LN(psi/K14))) I tried to "translate" this formula in

[R] 3D surface plot

2016-04-30 Thread T.Riedle
Dear R users, I am trying to generate a 3D surface plot given the inflator formula in the attached file. Now, I want to create a 3D plot showing how Delta changes with the values of Abs(B) and sigma. The other variables in the formula are constant. Delta is calculated daily therefore the

[R] rms package: output interpretation

2016-03-25 Thread T.Riedle
Hi everybody, I am trying to run a logistic regression using the rms package. Here is the output of my model. Logistic Regression Model lrm(formula = stock.market.crash ~ crash.t.1.to.t.L + MA.inflator.monthly + realized.volatility.10 + MA.MP.100 + MA.UI.100 + MA.DEI.100 + MA.UPR.100,

[R] cannot install stats package

2016-02-18 Thread T.Riedle
Dear R users, I would like to install the stats package but I get the message Warning in install.packages : package 'stats' is not available (for R version 3.2.3) How can I install stats without changing my R version? Is there an alternative package? Thanks for your help.

[R] rugarch package: VaR exceedances plot

2015-12-26 Thread T.Riedle
Dear all, I am trying to backtest my VaR model in R using the rugarch package. Hence, I am trying to plot the VaR exceedances using following code from the rugarch package: VaRplot(alpha=0.025,actual = returns,VaR = VaR,ylab = "daily log returns",xlab = "date") Unfortunately, I get this

[R] creating a xts object

2015-12-25 Thread T.Riedle
Dear all, I am working with the rugarch package which requires xts objects. I have installed the xts package to convert my dataset from .csv to a xts object but it does not work. My code looks as follows: VaRxts <- as.xts(VaR,order.by ="Date") Error in xts(x, order.by = order.by, frequency =

[R] quantile regression: error terms

2015-10-22 Thread T.Riedle
Greetings R Community, I am running quantile regressions using quantreg in R. I also plot the residuals in a QQplot which indicate fat tails. I would like to try using Student distribution, but I do not know if the R software allows it for my task in hand. In my opinion it is very likely that

[R] quantreg package: residuals

2015-10-21 Thread T.Riedle
Greetings R Community, I am running quantile regressions using quantreg in R. I also plot the residuals in a QQplot which indicate fat tails. I would like to try using Student distribution, but I do not know if the R software allows it for my task in hand. In my opinion it is very likely

[R] algorithmic method quantile regression

2015-10-14 Thread T.Riedle
Greetings R Community, I am trying to run a quantile regression using the quantreg package. My regression includes 7 independent variables with approx. 800 daily observations each. Thus, I think that the Barrodale and Roberts algorithm should do the trick. However, the Frisch-Newton after

Re: [R] algorithmic method quantile regression

2015-10-14 Thread T.Riedle
2015 22:33 To: T.Riedle Cc: r-help@r-project.org Subject: Re: [R] algorithmic method quantile regression Did you read item 1 in the quantreg FAQ()? url:www.econ.uiuc.edu/~rogerRoger Koenker emailrkoen...@uiuc.eduDepartment of Economics vox: 217-333-4558

[R] quantile regression: warning message

2015-10-13 Thread T.Riedle
Greetings R Community, I am trying to run a quantile regression using the quantreg package. My code looks as follows: RegressionUtilitiesUK<-rq(ReturnUtilities~yield.spread.change+ReturnFTSE, tau=0.01,data=State_variables_UK_calm) Unfortunately, the summary() function returns the results but

Re: [R] quantile regression: warning message

2015-10-13 Thread T.Riedle
Thank you very much. So, the results are correct and the differences between the solutions are pretty small. Thus, I do not need to worry about the warning message? Yes? -Original Message- From: Roger Koenker [mailto:rkoen...@illinois.edu] Sent: 13 October 2015 21:59 To: T.Riedle Cc

[R] plm package: error subscript out of bounds

2015-06-27 Thread T.Riedle
Hi everybody, I am trying to run a panel regression on 10 economic sectors with 4 independent variables, respectively. The plm() function works well for all 10 economic sectors together, i.e. the dataframe containing all sectors. Now, I am trying to run the same regression for each sector

[R] generating a data frame for plm regression

2015-06-17 Thread T.Riedle
Hi everybody, I am working with the plm package. I am struggling with the generation of the data frame in the plm() function. An example of my data are found in the attachment and I want to run a pooled regression on those. Hence, I need to generate a data frame using pdata.frame() function

[R] cannot run package anymore

2015-06-04 Thread T.Riedle
Hello, I have been using the midasr package for several month. Now I want to start it again and it does not work anymore. I have installed the newest R version but I get following message when I am trying to run midasr install.packages(midasr) trying URL

Re: [R] using filter() to sum up

2015-05-17 Thread T.Riedle
) : numerical expression has 3 elements: only the first used Why do I get this error message and how can I avoid it?? Thanks in advance -Original Message- From: peter dalgaard [mailto:pda...@gmail.com] Sent: 05 May 2015 11:41 To: T.Riedle Cc: r-help@r-project.org Subject: Re: [R] using filter

[R] using filter() to sum up

2015-05-04 Thread T.Riedle
Hi everybody, I am trying to create a code for the formula in the attachment. I first tried following code: ltau - m + theta*sum(psi*X[t-k]) but it does not work and I get for X[t-k] every third element in my vector three times which looks as follows: X[t-k] [1] -0.25 -0.25 -0.25 0.50 0.50

[R] obtaining the sum of lagged variables

2015-04-24 Thread T.Riedle
Hi everybody, I am trying to replicate the formula shown in the attachment. I want to estimate tau using a macroeconomic variable X at month t using k lags of the variable X. My code so far looks as follows: psi - fn(...) k - 1:K ltau - m + theta*sum(psi*X[t-k]) Unfortunately, if I run the

[R] Using matlab code in R

2015-03-31 Thread T.Riedle
Hi everybody, I have a matlab code which I would like to use for my empirical analysis. Unfortunately, I am not familiar with matlab and it would be great if there was a tool to translate the matlab code into R so that I can work with the code in R. Is there such a tool or package in R? Kind

[R] generating phi using function()

2015-03-30 Thread T.Riedle
. Thanks for your help From: jlu...@ria.buffalo.edu [mailto:jlu...@ria.buffalo.edu] Sent: 30 March 2015 16:01 To: T.Riedle Cc: r-help@r-project.org; R-help Subject: Re: [R] generating phi using function() Your function phi has 5 arguments with no defaults. Your call only has 3 arguments. Hence

[R] how to deal with changing weighting functions

2015-03-30 Thread T.Riedle
Hi everybody, Does anybody have an idea how I can generate tau according to the attached formula? The point is that phi changes with k and I thought I could make it by using a for-function in R but I am not sure how to do that. Could anyone help me? Thanks in advance.

[R] generating phi using function()

2015-03-29 Thread T.Riedle
Hi everybody, I am trying to generate the formula shown in the attachment. My formula so far looks as follows: phi - function(w1, w2, j, k, K){ zaehler - (k/K)^(w1-1)*(1-k/K)^(w2-1) nenner - sum( ((1:K)/K)^(w1-1)*(1-(1:K)/K)^(w2-1)) return( zaehler/nenner ) } Unfortunately something must be

[R] cannot load midasr package

2015-03-28 Thread T.Riedle
Dear Sirs, I am trying to implement the MIDAS regression but I cannot load the midasr package. When I load the package I get following message: library(midasr) Loading required package: sandwich Loading required package: optimx Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck =