Search found 16 matches

by bcchen
Mon Jul 31, 2017 2:47 pm
Forum: Data Manipulation
Topic: imputing missing data in panel/pooled dataset
Replies: 7
Views: 252

Re: imputing missing data in panel/pooled dataset

Stealing from Glenn: 4. genr(r) y_new2 = @recode(y=na and @obsid>1, @recode(y(1)=na, y_new2(1), y(1)), y) Hi guys, When I ran a similar codes like above on an alpha series, it only imputes the obs right before the not-empty ones. When I run the command again, it fills up the second one before the n...
by bcchen
Mon Jul 31, 2017 2:39 pm
Forum: Data Manipulation
Topic: VALUE MAP IMPORT AND LIMIT
Replies: 2
Views: 96

Re: VALUE MAP IMPORT AND LIMIT

HAHA, that's so weird.

When I do it today, it works.Maybe I was having other big work files opened last time.

Thank you so much!
by bcchen
Wed Jul 26, 2017 9:42 am
Forum: Data Manipulation
Topic: VALUE MAP IMPORT AND LIMIT
Replies: 2
Views: 96

VALUE MAP IMPORT AND LIMIT

HELLO, I have questions regarding building a value map. I have a series that includes SIC/NAICS code for each observation and I want to build a value map for SIC/NAICS code to the corresponding abbreviation of the industry name. So that series would show simple industry name instead of the code. I h...
by bcchen
Thu Jul 13, 2017 4:19 pm
Forum: Data Manipulation
Topic: imputing missing data in panel/pooled dataset
Replies: 7
Views: 252

Re: imputing missing data in panel/pooled dataset

Guys, for the reverse generation,

Code: Select all

genr(r) y_new2 = @recode(y=na and @obsid>1, @recode(y(1)=na, y_new2(1), y(1)), y)


why does @obsid have to be bigger than 1? what will happen if I don't put that?
by bcchen
Thu Jul 06, 2017 11:38 am
Forum: Data Manipulation
Topic: imputing missing data in panel/pooled dataset
Replies: 7
Views: 252

Re: imputing missing data in panel/pooled dataset

Hi Glenn and Gareth, Thanks you so much for your answers! They are exactly what I want! I have a follow-up on it: For (2), I agree with your point and I will think more about the implementation I want if modes are not unique. But assume that mode are unique, is there a function to pull the mode? som...
by bcchen
Wed Jul 05, 2017 10:28 am
Forum: Data Manipulation
Topic: imputing missing data in panel/pooled dataset
Replies: 7
Views: 252

imputing missing data in panel/pooled dataset

Hello, I have a question regarding simple imputing of missing data in a panel/pooled data set. Suppose I have dated panel data for 10 quarters (Q1-Q10) for 10 people(ID1-ID10). For certain field Y, 2 people are missing 2 quarter data. For each person, I want to use: 1) the average of the other 8 qua...
by bcchen
Mon Jun 19, 2017 10:54 am
Forum: Programming
Topic: Replacement Variables inside quotes
Replies: 8
Views: 889

Re: Replacement Variables inside quotes

oh yes! Got it worked now!
Thank you Gareth!
by bcchen
Mon Jun 19, 2017 10:03 am
Forum: Programming
Topic: Replacement Variables inside quotes
Replies: 8
Views: 889

Re: Replacement Variables inside quotes

Hello, I am trying to loop inside a location path as shown in the codes below. for %quarter 07q4 08q1 08q2 %file1="c:\users\bc03760\desktop\i-common field building\datarows\quarter workfiles\common field round\common filed round 2 apploan-acct attribute\commonfiled_"+{%quarter}+"applo...
by bcchen
Thu Jun 15, 2017 6:28 pm
Forum: Programming
Topic: structure workfile--create cellID with command when there are duplicates
Replies: 2
Views: 100

Re: structure workfile--create cellID with command when there are duplicates

maybe I am not clear what I want to do: when the ID series have duplicates, when we try to structure the page with that ID series, EVIEWS will pop up:" no uniquely identify observations. create CELLID series to identify observations?" Instead of passively waiting for the pop up, I want to ...
by bcchen
Thu Jun 15, 2017 6:20 pm
Forum: Bug Reports
Topic: Number of observations in alpha series
Replies: 10
Views: 1933

Re: Number of observations in alpha series

Hi,

One follow up question that is related: How do I store the number of observations of a alpha series as a series?

I tried:

series count=alpha.@obs

but the count shows all 0.

Any idea?

Thanks,
BC
by bcchen
Wed Jun 14, 2017 4:29 pm
Forum: Programming
Topic: structure workfile--create cellID with command when there are duplicates
Replies: 2
Views: 100

structure workfile--create cellID with command when there are duplicates

Hello guys,

I know that EVIEWS will offer to add a series called cellID when you try to structure a dataset with not-unique ID or ID combinations.

I wonder if there are commands that would allow me to do that so that I can include that into part of my program files instead?

Thanks!

Best,
BC
by bcchen
Thu Jun 01, 2017 4:52 pm
Forum: Data Manipulation
Topic: HOW TO GET MISSINGNESS PERCENTAGE OF EACH SERIES
Replies: 4
Views: 241

Re: HOW TO GET MISSINGNESS PERCENTAGE OF EACH SERIES

thanks for the quick response Gareth!

Can you give more detail on the codes on how to store each number in a table?

Thanks!
by bcchen
Thu Jun 01, 2017 4:26 pm
Forum: Data Manipulation
Topic: HOW TO GET MISSINGNESS PERCENTAGE OF EACH SERIES
Replies: 4
Views: 241

HOW TO GET MISSINGNESS PERCENTAGE OF EACH SERIES

Hi, I wonder if there is a quick way to create a missingness percentage table for each of the series (alpha and numeric) in a workfile? If it can be presented as a table, it is even better. For missingness percentage, I mean, for alpha series, the blank cell number/total sample; and for numeric, the...
by bcchen
Thu Jun 01, 2017 4:20 pm
Forum: Programming
Topic: Loop: get series and do operations on them
Replies: 6
Views: 1272

Re: Loop: get series and do operations on them

THANKS!

Go to advanced search