similar to: I made some progress on my previous "systemfit" question but still not quite there

Displaying 20 results from an estimated 500 matches similar to: "I made some progress on my previous "systemfit" question but still not quite there"

2009 May 29
1
Error messages/systemfit package
Hello !   I’m trying to estimate a system of equation (demand and supply) using the systemfit package.  My program is:   library(systemfit) demand <- tsyud ~ tsyud1 + tsucp + tspo + tssn supply <- tscn ~ tsyn + tsqn + tsksn + tsucp system <- list(demand=eqdemand, learning = eqsupply) labels <- list(demand="eqdemand", learning="eqsupply") inst <- ~ tsupp1 + tsupp2
2007 May 23
0
Changing sequential regression code to call systemfit
I use code ( actually its code from vars package and its directly below ) to do a sequence of lm calls and the data I use from the matrix depends on restrictions. for(i in 1:K){ datares <- datasub[, which(x$restrictions[i, ] == 1),drop=FALSE] y <- yendog[, i] lmres <- lm(y ~ -1 + ., data=datares) # x$varresult[[i]] <- lmres # x$resid[, i] <-
2009 Aug 18
3
R formula
Hi I was trying to estimate simultaneous equation system in R using systemfit. I used the following commands >library(systemfit) > data(Kmenta) > attach(Kmenta) >eqDemand<-consump~price+income > eqSupply<-consump~price+farmprice+trend > fitsur<-systemfit("SUR",list(demand=eqDemand, supply=eqSupply)) and got the following error messege Error in
2007 May 08
2
Looking for a cleaner way to implement a setting certain indices of a matrix to 1 function
I wrote an ugly algorithm to set certain elements of a matrix to 1 without looping and below works and you can see what The output is below the code. K<-6 lagnum<-2 restrictmat<-matrix(0,nrow=K,ncol=K*3) restrictmat[((col(restrictmat) - row(restrictmat) >= 0 ) & (col(restrictmat)-row(restrictmat)) %% K == 0)]<-1 restrictmat[,(lagnum*K+1):ncol(restrictmat)]<-0 restrictmat
2008 Nov 08
1
Clustering and functions
I am new to R and have written a function that clusters on subsets of a big data data set with 60,000 points. I am not sure why, but I keep getting a run-time error. Any suggestions would be greatly appreciated. Here is the code: library(cba) d<-read.csv("data.csv", header=TRUE) v<-c(53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,21,72 73,74,75,76,77,78)
2012 Apr 27
1
multivariate xts merge question
Hi, I have an xts starting with a number of columns (currency pairs see below), then I add new ones which are derived from existing ones (like adding the moving average of a column) by merging the new columns one by one. These get the name of the column they are calculated from concatenated with ".1". All done by merge.xts, easy. Now, I have a function (procState below) which generates
2006 Apr 19
1
Probable Numeric Bugs in svd function (PR#8781)
Hello,=0D =0D I just noticed that the "svd" function does not work properly for some=0D sparse matrices.=0D When I replace the 0 by very small noises (let's say 10^-16), it then=0D works.=0D The test I've performed is to compared the singular values to the eigen=0D values (as I work with squarred matrices).=0D =0D Here is the code (I may be wrong!):=0D =0D
2007 Apr 16
1
Names in vector occurring in another vector
I have a vector of character strings such as mainnames<-c("CAD","AUD") and another vector say checknames<-c("CAD.l1","AUD.l1","JPY.l1","EUR.l1","CAD.l2","AUD.l2","JPY .l2","EUR.l2") I want a new vector of character strings that is just
2012 Oct 28
6
Hausman test in R
Hi there, I am really new to statistics in R and statistics itself as well. My situation: I ran a lot of OLS regressions with different independent variables. (using the lm() function). After having done that, I know there is endogeneity due to omitted variables. (or perhaps due to any other reasons). And here comes the Hausman test. I know this test is used to identify endogeneity. But what I
2012 Jan 19
8
sumarizar
*Hola!!! resulta que tengo unos datos de divisas ordenados por fechas (días) los que he convertido a formato tipo YYYY-MM-DD donde DD siempre es 01:* * * * EUR.resto$date<-as.Date(EUR.resto$date) EUR.resto$mo <- substr(EUR.resto$date,6,7) EUR.resto$yr <- substr(EUR.resto$date, 1,4)
2011 Jan 07
1
Currency return calculations
Dear sir, I am extremely sorry for messing up the logic asking for help w.r.t. my earlier mails   I have tried to explain below what I am looking for.     I have a database (say, currency_rates) storing datewise currency exchange rates with some base currency XYZ.   currency_rates <- data.frame(date = c("12/31/2010", "12/30/2010", "12/29/2010",
2011 Jan 07
0
Odp: Currency return calculations
My mistake sir. I was literally engrossed in my stupid logic, and while doing so, overlooked the simple and very effective solution you had offered. Sorry once again sir and will certainly try to be very careful in future. Thanks again and have a great weekend sir. Regards Amelia --- On Fri, 7/1/11, Petr PIKAL <petr.pikal@precheza.cz> wrote: From: Petr PIKAL
2007 May 31
0
Merging two data objects question
I have two R objects, allDataSubset1 and allDataSubset2 and the str of both of them is shown below ( I don't show all 18 lists for space purposes ). The difference between them is that the times ( and possibly the days ) and the data is different and what I want to do is merge them so that only the data in Subset2 that is the same day and times as Subset 1 remains in the merged dataset.
2011 Jan 07
1
Calculating Returns : (Extremely sorry for earlier incomplete mail)
Dear R forum helpers, I am extremely sorry for the receipt of my incomplete mail yesterday. There was connectivity problem at my end and so I chose to send the mail through my cell, only to realize today about the way mail has been transmitted. I am again sending my complete mail through regular channel and sincerely apologize for the inconvenience caused. ## Here is my actual mail Dear R
2004 Jul 29
3
Editing Strings in R
I was wondering if there is a way of editting strings in R. I have a set of strings and each set is a row of numbers and paranthesis. For example the first row is: (0 2)(3 4)(7 9)(5 9)(1 5) and I have a thousand or so such rows. I was wondering how I could get the corresponding string obtained by adding 1 to all the numbers in the string above. Dursun [[alternative HTML version deleted]]
2011 Jan 06
1
Calcuting returns
Dear R forum helpers,I have following datatrans <- data.frame(currency_transacted = c("EURO", "USD", "USD", "GBP", "USD", "AUD"), position_amt = c(10000, 25000, 20000, 15000, 22000, 30000))date <- c("12/31/2010", "12/30/2010", "12/29/2010", "12/28/2010", "12/27/2010",
2003 Feb 21
0
Linear mixed effects models
Hi everyone, I'm a newbie to R and to linear mixed effects modeling, so please have mercy :-) Just wanted to check, whether what I'm doing is alright. I've collected data concerning tonotopic organization of the auditory cortex in humans, and I have approximately 1400-1800 data/time points per person (13 in total). Observations were made how the focus of neuronal activity changed
2009 Mar 03
1
zoo and coredata() classes
Hi guys I have a reasonably basic question with zoo usage, but I havent been able to find a satisfactory workaround yet. Heres a simple example of what I'm talking about (the following data frame contains numeric columns that contains NAs): > head(ebs) time src tstamp code bid ask 1 2009-03-03 13:03:29.536 perf.Tib_listener 14980321164 EBS.REC.EURJPY=EBS.NaE 123.48 NA 2 2009-03-03
2006 Jul 13
1
ols/gls or systemfit (OLS, WLS, SUR) give identical results
I might be sorry for asking this question :-) I have two equations and I tried to estimate them individually with "lm" and "gls", and then in a system (using systemfit) with "OLS", "WLS" and "SUR". Quite surprisingly (for myself at least) the results are identical to the last digit. Could someone (please!) give a hint as to what am I
1999 Aug 13
1
strange scan, count.fields
Does anybody understand what's going on here: I have the following ascii file called "y.txt" "USD-DEM" "USD-JPY" "DEM-JPY" 0.344901 4.78712 4.442 0.345715 4.7882 4.44189 0.350657 4.79065 4.44177 0.35347 4.79065 4.43616 0.35368 4.78957 4.43622 0.35361 4.78982 4.43669 0.353821 4.79036 4.43622 0.352767 4.78899 4.43634 0.353119 4.78916 4.43545