Displaying 20 results from an estimated 10000 matches similar to: "Seemingly Unrelated Regressions question - not R question"
2010 Sep 03
1
How to use lm() output for systemfit() 'Seemingly unrelated regression'
I am having problem using output of lm() function for further analysing using
systemfit package.
Basicaly, the problem s following - I generate several formulas using lm()
> fo1 <- lm(r98[,2] ~ f98[,1] + f98[,2] + ... + f98[,43])
> fo2 <- lm(r98[,1] ~ f98[,1] + f98[,2] + ... + f98[,43])
and than I want to estimate a general model using package systemfit.
> fitsur <-
2006 Dec 06
0
Re : stat question - not R question so ignore if not interested
For the first question x'(y-bx)<>0 or Cov(Ui,Xi)<>0 you have heterogeinity problem !
OLS estimator in this case in biased.
The bias is equal to (Exx')^{-1}Exu
You obtain obtain correct estimator by use instrumental variable or 2SLS ...
Justin BEM
Elève Ingénieur Statisticien Economiste
BP 294 Yaoundé.
Tél (00237)9597295.
----- Message d'origine ----
De
2007 Oct 12
2
Plotting question
I am constructing plots ( regular not lattice ) and my initial command
is
par(mar=c(3,4,2,2), mfcol=c(5,2))
and then I create 10 plots on the page. It looks great but the plots on
the page go in the order
1 6
2 7
3 8
4 9
5 10
Where the numbers denote decile breakdowns.
Is there an easy way to make them go from left to right so
1 2
3 4
5 6
7 8
9 10
I could try
2006 Nov 14
2
putting a column name on a zoo object
does anyone know how to put a column name on a zoo object. I think achim
and gabor are off line or they have gotten totally tired of me
an decided to ignore me ( which is totalyy understandable ).
logbidask<-log((aggfxdata[,"bid"] + aggfxdata[,"ask"])/2.0)
logbidask doesn't have a name and I can't figure out how to get one on
it ?
aggfxdata is a zoo object.
2006 Nov 12
7
I think a simple question
I have index ( of a vector ) values of say
tempin<-c(1 31 61 91 121 all the way upto 1411)
What I want is a function that takes in a number say, x = 5, and gives
me an new vector
of
tempout<-1 6 31 36 91 96 121 126 .......... 1411 1416
This can't be so hard but I can't get it and I've honestly tried.
Obviously, tempin + 5 gives me the missing values but I
2007 Aug 24
4
Turning a logical vector into its indices without losing its length
I have the code below which gives me what I want for temp based on
logvec but I was wondering if there was a shorter way ( i.e :
a one liner ) without having to initialize temp to zeros. This is
purely for learning purposes. Thanks.
logvec <- c(TRUE,FALSE,FALSE,TRUE,FALSE,FALSE,TRUE,FALSE)
temp<-numeric(length(invec))
temp[invec]<-which(invec)
temp
[1] 1 0 0 4 0 0 7 0
obviously, the
2007 Feb 05
2
ar function in stats
I had a couple of questions about the ar function that i was hoping
someone could answer.
I have the structure below
testSeries<-structure(c(-3.88613620955214e-05, 0, -7.77272551011343e-05,
0, -0.000194344573539562, -0.000116624876218163, -3.88779814601281e-05,
0, 3.88779814601281e-05, -0.000155520995647807, -0.000116656621367561,
-3.88885648225368e-05, -3.88900772017586e-05,
2006 Oct 17
3
barplot question
i'm doing a bar plot and there are 16 column variables. is there a way
to make the variable names go down instead of across when you do the
barplot ?
because the names are so long, the barplot just shows 3 names and leaves
the rest out. if i could rotate the names 90 degrees, it would probably
fit a lot more.
or maybe i can use space to make the horizontal width longer ? I looed
up ?barlot but
2007 Apr 13
0
Problem with predict in systemfit
A friend of mine sent me below so I am posting below. If it is not
enough information, please just
let me know and I will tell him. Thanks.
-----Original Message-----
Sent: Friday, April 13, 2007 3:58 PM
To: Leeds, Mark (IED)
Subject: R question
I am using the "predict" function after I have done a simultaneous
estimation of a system using "systemfit". fitsur is the output
2007 Oct 11
6
confusion with R syntax
I just noticed something by accident with R syntax that I'm sure is
correct but I don't understand it. If I have
a simple numeric vector x and I subscript it, it seems that I can then
subscript a second time with TRUE
or FALSE, sort of like a 2 dimensional array in C. Does someone know if
this is documented somewhere
Because it's neat but I never knew it existed. To me it seems like a
2006 Oct 18
2
not understanding a do.call
I did a ?do.call but i don't think i understand it.
if a, b,c,d are numeric vectors then could someone explain the
difference between
do.call("cbind",list(a,b,c,d))
and cbind(a,b,c,d).
or point to an archive on it.
the return value of cbind is a matrix or dataframe depending on what is
sent in but i don't
understand wheen it would be useful to use do.call. i realize it
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
2006 Oct 09
1
read.zoo question
I have comma delimited asci data with each row being in the format :
2006-01-24 02:41:24.00011,1.22930000,5,1.22950000,7
.
.
.
.
and i'm trying to use read.zoo ( which is similar to read.table ) to
read in the data. the data goes all the way out to milliseconds and i
can't figure out what to put for the format field. if i put nothing,
then read.zoo gets rid of the the whole time and
2006 Oct 17
1
looking for a cleaner way to do something
I have two numeric vectors each of length 17 and each is named the exact
same way.
so
obsnum ppppp ppppm pppmp . dot dot dot......
temp1 is 1417 52 63 85
obsnum ppppp ppppm pppmp . dot dot dot......
temp2 is 1213 41 50 97
what i want to have is a resultant matrix with 2 rows and 16 columns
where the 16
2006 Oct 02
1
install packages question
I am at a new job where my sys admin installed R in linux and it does
run when I log in as a user. I am on linux 2.1.2 but i'm not sure if
it''s redhat etc ( but i doubt this matters for my question ).
The alias put in my .envfile ( for the kshell ) is
R =
"/ms/dev/fsf/R/2.0.0/install/.exec/ia32.linux.2.4.lib6/lib/R/bin/exec/R"
and my R_HOME is
2007 Jul 06
1
algebra/moving average question - NOTHING TO DO WITH R
This has ABSOLUTELY nothing to do with R but I was hoping that someone
might know because there are obviously a lot of very bright people on
this list.
Suppose I had a time series of data and at each point in time t, I was
calculating x bar + plus minus sigma where x bar was based on a
moving window of size n and so was sigma.
So, if I was at time t , then x bar t plus minus sigma_t would be
2007 May 08
2
statistics/correlation question NOT R question
This is not an R question but if anyone can help me, it's much
appreciated.
Suppose I have a series ( stationary ) y_t and a series x_t ( stationary
)and x_t has variance sigma^2_x and epsilon is normal
(0, sigma^2_epsilon )
and the two series have the relation
y_t = Beta*x_t + epsilon
My question is if there are particular values that sigma^2_x and
sigma^2_epsilon have to take in
2007 Sep 11
6
xyplot question
I have the code below and it works fine if I print the xyplot but if I
take the print out, then I just get a blank
pdf. The same holds if I just send the plot to the console without the
print ( I get nothing ). My question is whether this is always
the case with xyplot or is there something wrong with my settings ? I am
on linux ( redhat ) and using R.2.5.0. Thanks.
load("stocks.dat")
2007 Jun 12
3
Panel data
Dear all R users,
I have a small doubt about panel data analysis. My basic understanding on Panel data is a type of data that is collected over time and subjects. Vector Autoregressive Model (VAR) model used on this type of data. Therefore can I say that, one of statistical tools used for analysis of panel data is VAR model? If you clarify my doubt I will be very grateful.
Thanks and regards,
2007 Sep 04
2
Confusion using "functions to access the function call stack" example section
I was going through the example below which is taken from the example
section in the R documentation for accessing the function call stack.
I am confused and I have 3 questions that I was hoping someone could
answer.
1) why is y equal to zero even though the call was done with gg(3)
2) what does parents are 0,1,2,0,4,5,6,7 mean ? I understand what a
parent frame is but how do the #'s relate