Help using Base SAS procedures

import mplus .dat file

Reply
Contributor
Posts: 47

import mplus .dat file

Hi,

I need to import data obtained via MPLUS. I made an excel file from the data - and imported it into SAS. But a column that was mainly missing (but not fully missing) ended up fully missing in SAS - not sure why.

Thought I should try to INPUT or IMPORT directly from the MPLUS .dat file. MPLUS provides the format as:
AFDC0103 F10.3
AFDC01ON F10.3
AFDC03ON F10.3
MOWK0301 F10.3
HRS0301 F10.3
EARN0301 F10.3
WAGE0301 F10.3
DCP0301 F10.3
BLACK01 F10.3
UNEMP_01 F10.3
POV_2001 F10.3
WLF_RCPT F10.3
ER17016 F10.3
ER17017 F10.3
ER17013 F10.3
HGHGRADE F10.3
GRAD_HS F10.3
ER17002 I5
CPROB1 F10.3
CPROB2 F10.3
CPROB3 F10.3
C F10.3

From an eyeball look - it's not delimited. One issue is that if a field is missing, there's an asterisk left justified (immediately next to the previous data). The nonmissing items in said variable are right justified -

Thanks,
Anjali
PROC Star
Posts: 1,566

Re: import mplus .dat file

How about you use the description and :
1- replace F10.3 by 10.3
2- replace I5 by 5.
to create the input statement.

On the data side (in the file):
1- replace StarSpace with SpaceDot

Would that work?
Ask a Question
Discussion stats
  • 1 reply
  • 412 views
  • 0 likes
  • 2 in conversation