Search found 123 matches
- Tue Mar 20, 2018 1:00 pm
- Forum: Programming
- Topic: Replace the for loop line with
- Replies: 1
- Views: 111
Replace the for loop line with
Hello, I have a few of the exact same for loops in a program. I was wondering if there is a way change them all at once. In other words, my for loop goes through a list of variables which I am adding to, rather than going to every line where that for loop appears is it possible to change it once in ...
- Tue Mar 20, 2018 10:20 am
- Forum: Estimation
- Topic: PCA in Stata
- Replies: 1
- Views: 135
PCA in Stata
Hi,
I'm trying to replicate a principal component indicator that was created in Stata using the "pca" command but even though I'm using the same source data I get a slightly different PCA series. Any idea why that might be?
Thanks.
I'm trying to replicate a principal component indicator that was created in Stata using the "pca" command but even though I'm using the same source data I get a slightly different PCA series. Any idea why that might be?
Thanks.
- Tue Feb 27, 2018 8:49 am
- Forum: Programming
- Topic: naming samples in a program
- Replies: 2
- Views: 146
naming samples in a program
This is only a a minor annoyance but when I re-run a program that contains a sample I created, the program stops saying that sample already exists. Is there a way around that other than commenting out the sample creation line?
Thanks
Thanks
- Mon Feb 26, 2018 10:13 am
- Forum: Programming
- Topic: question on sample selection
- Replies: 4
- Views: 201
Re: question on sample selection
Thank you!
- Mon Feb 26, 2018 9:27 am
- Forum: Programming
- Topic: question on sample selection
- Replies: 4
- Views: 201
question on sample selection
Hi, I'd like to analyse properties of the first month of each quarter in a data series. I'm thinking I should just create a new series with NA's for all other months but I'm wondering what is a faster way to create the sample than this smpl 2000:01 2000:01 2000:04 2000:04 etc etc Thanks!
- Fri Feb 02, 2018 3:22 pm
- Forum: Programming
- Topic: Programming a table
- Replies: 21
- Views: 642
Re: Programming a table
ok, that one hurt.
thanks
thanks
- Fri Feb 02, 2018 3:05 pm
- Forum: Programming
- Topic: Programming a table
- Replies: 21
- Views: 642
Re: Programming a table
Here's the code for %names a b c d e f !row = !row + 1 {%table}(!row,1) = "{%names}" {%table}(!row,2) = @mean({%names}{%somethingelse}) So I was hoping to get the first column to be rows that say "a" then next row says "b" etc. But they all just actually say {%names}. a...
- Fri Feb 02, 2018 2:20 pm
- Forum: Programming
- Topic: Programming a table
- Replies: 21
- Views: 642
Re: Programming a table
Here's another table question.
I was hoping to have the first column in my table be the names in my for string. But if I put {%string} in brackets to tell the table to read it It just displays {%string}. Is there a workaround for this?
I was hoping to have the first column in my table be the names in my for string. But if I put {%string} in brackets to tell the table to read it It just displays {%string}. Is there a workaround for this?
- Fri Feb 02, 2018 9:48 am
- Forum: Programming
- Topic: What's the eviews equivalent of Excel's countif?
- Replies: 10
- Views: 343
Re: What's the eviews equivalent of Excel's countif?
ah, ok. Thanks.
- Fri Feb 02, 2018 9:41 am
- Forum: Programming
- Topic: What's the eviews equivalent of Excel's countif?
- Replies: 10
- Views: 343
Re: What's the eviews equivalent of Excel's countif?
Im not familiar with the replace function but I found the following code which worked well. Thanks
Code: Select all
series y = @recode(@abs(x) < @quantile(@abs(x), .9), x, na)
- Fri Feb 02, 2018 9:22 am
- Forum: Programming
- Topic: What's the eviews equivalent of Excel's countif?
- Replies: 10
- Views: 343
Re: What's the eviews equivalent of Excel's countif?
Can I use this sample sample trick to replace outliers in a series with NAs? Say I want to remove the highest and lowest 5% of observations in a series can i put somehting in this blank space that would do that?
Code: Select all
smpl if x1>_____
- Fri Feb 02, 2018 9:12 am
- Forum: Programming
- Topic: What's the eviews equivalent of Excel's countif?
- Replies: 10
- Views: 343
Re: What's the eviews equivalent of Excel's countif?
Thanks Gareth!
- Fri Feb 02, 2018 8:06 am
- Forum: Programming
- Topic: What's the eviews equivalent of Excel's countif?
- Replies: 10
- Views: 343
Re: What's the eviews equivalent of Excel's countif?
Thanks but I'm not getting that to work. I get this message: NA found in matrix in "SCALAR TEST= @SUM(x>0)". The sereies has some Nas, but even when I fill them in I get this error message: Scalar sent to function which operates on a matrix in "SCALAR TEST=@SUM(x>0)". Any ideas? ...
- Thu Feb 01, 2018 4:00 pm
- Forum: Programming
- Topic: What's the eviews equivalent of Excel's countif?
- Replies: 10
- Views: 343
What's the eviews equivalent of Excel's countif?
I want to know how many positive numbers are in a series. in Excel its a simple countif > o type formula. What would be the eviews equivalent?
Thanks!
Thanks!
- Thu Feb 01, 2018 2:50 pm
- Forum: Programming
- Topic: Programming a table
- Replies: 21
- Views: 642
Re: Programming a table
Gareth, you, Sir, are the man.