BookmarkSubscribeRSS Feed
anjgupta
Calcite | Level 5
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
1 REPLY 1
ChrisNZ
Tourmaline | Level 20
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?

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 1 reply
  • 1279 views
  • 0 likes
  • 2 in conversation