search for: petzev

Displaying 11 results from an estimated 11 matches for "petzev".

Did you mean: petzel
2011 Apr 28
2
for loop with global variables
Hi, is there a possibility to use global variables in a for loop. More specifically, I want to do the following: output.1<-rbind("a","b") output.2<-rbind("c","d") output.3<-rbind("e","f") . . . output.n<-rbind(...,...) next I want to create a data frame with two columns: Outputs Values output.1 "a","b"
2012 Jun 23
3
Event Studies in R
Dear all I tried finding a package for event studies but unfortunately without success. Does anyone know which package suits best for such an analysis? Thank you in advance. Regards [[alternative HTML version deleted]]
2011 Mar 03
2
Multivariate Granger Causality Tests
Dear Community, For my masters thesis I need to perform a multivariate granger causality test. I have found a code for bivariate testing on this page (http://www.econ.uiuc.edu/~econ472/granger.R.txt), which I think would not be useful for the multivariate case. Does anybody know a code for a multivariate granger causality test. Thank you in advance. Best Regards -- View this message in context:
2011 Apr 28
1
AutomaticTRUE/FALSE Matrix Generation
Dear All, I am a newbee in R an have the following problem. I have variables AB,BC,CD to which outputs are assigned. Now AB[,1], for example, outputs a list, which is a random combination of the following characters: "AB", "BC", "CD". What I want to do is to build a 3x3 matrix with colnames and rownames equal to "AB", "BC", "CD". Matrix
2011 Jun 20
6
for loop and linear models
Hi, I have two datasets, x and y. Simplified x and y denote: X Y A B C A B C . . . . . . . . . . . . . . . . . . I want to implement all possible models such as lm(X$A~Y$A), lm(X$B~Y$B), lm(X$C~Y$C)... I have tried the following: fun<- function(x,y){ for(i in 1:length(colnames(x))){ for(j in 1:length(colnames(y))){
2011 Apr 04
1
Granger Causality in a VAR Model
Dear Community, I am new to R and have a question concerning the causality () test in the vars package. I need to test whether, say, the variable y Granger causes the variable x, given z as a control variable. I estimated the VAR model as follows: >model<-VAR(cbind(x,y,z),p=2) Then I did the following: >causality(model, cause="y"). I thing this tests the Granger causality of
2011 Apr 25
2
extracting names from matrix according to a condition
Dear Community, I have a matrix with assigned colnames and rolnames as follows: A B NR 0.15 0,05 AL 0,05 0,05 . . . . . . . . . I want to extract the names of the rows for which A>0,1 and B<0,1. In the above example this would be observation NR only. Hence the output should write for
2011 Apr 26
0
Problem with lapply and splitted variables
Dear Community, I have the following two variables, which I have split according to a factor: *y1* [1] 1 2 3 [2] 2 3 4 and *y2* A B [1] 1 4 2 5 3 6 [2] 2 5 3 6 4 7 Now I need the following Vector Autoregressive Models: VAR(cbind(y1[1],y2[1]$A)), VAR(cbind(y1[1],y2[1]$B)), VAR(cbind(y1[2],y2[2]$A)), VAR(cbind(y1[2],y2[2]$B)). My problem is that when using this argument: lapply(y2,
2011 Apr 29
1
matrix evaluation using if function
Hi All, I am trying to create a function which evaluates whether the values (which are equal to one) of a matrix are the same as their mirror values. Consider the following matrix: > n<-matrix(cbind(c(0,1,1),c(1,0,0),c(0,1,0)),3,3) > colnames(n)<-cbind("A","B","C");rownames(n)<-cbind("A","B","C") > n A B C A 0 1 0 B
2013 Feb 11
1
store variables in a for loop using get()
Dear R list, I have a problem in assigning values to existing data frames in R. I have a vector x containing the names of the data frames, which I create to store the results for each variable (a1,a2,a3) obtained in time series moving regressions. Thus, say, x=c('a1','a2','a3') Moreover, b is a vector containig unique dates of the points in time of the moving
2011 Apr 14
1
Automatically extract info from Granger causality output
Dear Community, this is my first programming in R and I am stuck with a problem. I have the following code which automatically calculates Granger causalities from a variable, say e.g. "bs" as below, to all other variables in the data frame: log.returns<-as.data.frame( lapply(daten, function(x) diff(log(ts(x))))) y1<-log.returns$bs y2<- log.returns[,!(names(log.returns) %in%