Write and run SAS programs in your web browser

problem with proc factor under sas for university

Reply
Occasional Contributor
Posts: 19

problem with proc factor under sas for university

When I try to run a program that i already used, i have an error. message. ERROR: Invalid characters were present in the data. ERROR: Error al procesar datos de texto. . I tryed with an ejampleI gived in the manual and i have the same error. I think that es somethin wrong in the procedure.
Super User
Posts: 10,516

Re: problem with proc factor under sas for university

Please post the code and messages of the example from the manual. Paste into a code box opened using the forum {i} menu icon to preserve formatting of the code and related messages.

Super User
Posts: 17,864

Re: problem with proc factor under sas for university

I've seen some of this with users who are using SAS UE with a different language. 

 

You're using SAS UE installed via VirtualBox?

Can you try changing your settings to English (not ideal) and see if that resolves the issue?

The other times this happens its because code was copied and pasted from a browser (or something else) into the editor and it has invisible characters. Try checking your code in a text editor and lookingat invisible characters. 

 

Occasional Contributor
Posts: 19

Re: problem with proc factor under sas for university

Ok, but i used the data with the corr procedure without problems.
Anyway I'll have a look

Super User
Posts: 17,864

Re: problem with proc factor under sas for university

Ok, post the code and we can see if we can replicate the issues.

Occasional Contributor
Posts: 19

Re: problem with proc factor under sas for university

This is the example I used. I have the same error code when I run my own program.

data SocioEconomics;
title 'Five Socioeconomic Variables';
title2 'See Page 14 of Harman: Modern Factor Analysis, 3rd Ed';
input Population School Employment Services HouseValue;
datalines;
5700 12.8 2500 270 25000
1000 10.9 600 10 10000
3400 8.8 1000 10 9000
3800 13.6 1700 140 25000
4000 12.8 1600 140 25000
8200 8.3 2600 60 12000
1200 11.4 400 10 16000
9100 11.5 3300 60 14000
9900 12.5 3400 180 18000
9600 13.7 3600 390 25000
9600 9.6 3300 80 12000
9400 11.4 4000 100 13000
;
title3 'Principal Component Analysis';
proc factor data=SocioEconomics simple corr;
run;
[cid:image001.jpg@01D2FCA3.870D4BB0]

Super User
Posts: 17,864

Re: problem with proc factor under sas for university

No issues that I see here:

 1          OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
 59         
 60         data SocioEconomics;
 61         title 'Five Socioeconomic Variables';
 62         title2 'See Page 14 of Harman: Modern Factor Analysis, 3rd Ed';
 63         input Population School Employment Services HouseValue;
 64         datalines;
 
 NOTE: The data set WORK.SOCIOECONOMICS has 12 observations and 5 variables.
 NOTE: DATA statement used (Total process time):
       real time           0.00 seconds
       user cpu time       0.00 seconds
       system cpu time     0.00 seconds
       memory              764.15k
       OS Memory           24996.00k
       Timestamp           07/14/2017 04:41:22 PM
       Step Count                        4  Switch Count  69
       Page Faults                       0
       Page Reclaims                     553
       Page Swaps                        0
       Voluntary Context Switches        224
       Involuntary Context Switches      0
       Block Input Operations            0
       Block Output Operations           264
       
 77         ;
 
 78         title3 'Principal Component Analysis';
 79         proc factor data=SocioEconomics simple corr;
 80         run;
 
 NOTE: 2 factors will be retained by the MINEIGEN criterion.
 NOTE: PROCEDURE FACTOR used (Total process time):
       real time           0.07 seconds
       user cpu time       0.07 seconds
       system cpu time     0.00 seconds
       memory              3121.12k
       OS Memory           27048.00k
       Timestamp           07/14/2017 04:41:22 PM
       Step Count                        5  Switch Count  24
       Page Faults                       0
       Page Reclaims                     1283
       Page Swaps                        0
       Voluntary Context Switches        44
       Involuntary Context Switches      0
       Block Input Operations            0
       Block Output Operations           24
       

Restart your session and use the code below. Note that I've posted it using the { i } icon above, the code editor makes sure it's plain text. You may need to post your code in a similar manner or as a plain text file.

 

data SocioEconomics;
title 'Five Socioeconomic Variables';
title2 'See Page 14 of Harman: Modern Factor Analysis, 3rd Ed';
input Population School Employment Services HouseValue;
datalines;
5700 12.8 2500 270 25000
1000 10.9 600 10 10000
3400 8.8 1000 10 9000
3800 13.6 1700 140 25000
4000 12.8 1600 140 25000
8200 8.3 2600 60 12000
1200 11.4 400 10 16000
9100 11.5 3300 60 14000
9900 12.5 3400 180 18000
9600 13.7 3600 390 25000
9600 9.6 3300 80 12000
9400 11.4 4000 100 13000
;
title3 'Principal Component Analysis';
proc factor data=SocioEconomics simple corr;
run;
Occasional Contributor
Posts: 19

Re: problem with proc factor under sas for university

I resolved the issue settings the browser to English

Ask a Question
Discussion stats
  • 7 replies
  • 117 views
  • 0 likes
  • 3 in conversation