Learning SAS? Welcome to the exclusive online community for all SAS learners.

TypeError: Cannot read property 'replaceAll' of undefined

Reply
Contributor
Posts: 71

TypeError: Cannot read property 'replaceAll' of undefined

[ Edited ]

Why I get this error: "TypeError: Cannot read property 'replaceAll' of undefined" while saving code. Also "WARNING: PROC NLIN failed to converge" when run the codes.

PROC IMPORT DATAFILE="/folders/myfolders/GE_rainbow.xlsx"
		    OUT=rainbow
		    DBMS=XLSX
		    REPLACE;
RUN;
title 'Gastric evacuation in rainbow. +AC model';
data exp;
set rainbow;
if expno=1 or expno=2 or expno=3 or expno=4;
run;

proc nlin data=exp method=marquardt;
parms A=0.08 B=0.5 C=1.5 RA=0.0005;
delta=0.00000001;

R=RA*EXP(A*temp)*predlcm**C;

s=sow**(1-B)-R*(1-B)*time;
if s>0 then stx=s**(1/(1-B));
else stx=0;

model stw=stx;

sa=(sow**(1-B)-RA*EXP((A-delta)*temp)*predlcm**C*(1-B)*time);
if sa>0 then sda=(stx-sa**(1/(1-B)))/delta;
else sda=0;
der.A=sda;

sb=(sow**(1-B+delta)-RA*EXP(A*temp)*predlcm**C*(1-B+delta)*time);
if sb>0 then sdb=(stx-sb**(1/(1-B+delta)))/delta;
else sdb=0;
der.B=sdb;

sc=(sow**(1-B)-RA*EXP(A*temp)*predlcm**(C-delta)*(1-B)*time);
if sc>0 then sdc=(stx-sc**(1/(1-B)))/delta;
else sdc=0;
der.C=sdc;

sr=(sow**(1-B)-(RA-delta)*EXP(A*temp)*predlcm**C*(1-B)*time);
if sr>0 then sdr=(stx-sr**(1/(1-B)))/delta;
else sdr=0;
der.RA=sdr;
output out=expp p=pstw r=stw_residual;
run;
proc summary data=expp;
     var stw_residual stw;
     output out=stats css(stw)=sstot uss(stw_residual)=ssres N=N;
run;
data expp;
     set stats;
     rsquared=1-(ssres/sstot);
     adjrsquared = 1-(1-rsquared)*(N-1) / (N- 4  -1);
run;
proc print data=expp;
run;

N.B.

Here is a link to download the resulted file (after running the above codes): https://goo.gl/AqLdRx

Contributor
Posts: 71

Re: TypeError: Cannot read property 'replaceAll' of undefined

The "WARNING: PROC NLIN failed to converge" was solved by just deleting derivatives from SAS code. But still while saving codes i get this error "TypeError: Cannot read property 'replaceAll' of undefined".

Community Manager
Posts: 3,448

Re: TypeError: Cannot read property 'replaceAll' of undefined

Is that error coming from SAS Studio / SAS University Edition?  That might be a SAS Studio glitch.  I found a reference to an older occurrence of this error internally, but that particular problem was addressed.

Contributor
Posts: 71

Re: TypeError: Cannot read property 'replaceAll' of undefined

Posted in reply to ChrisHemedinger
Yes, it is from SAS Studio. I am using SAS University Edition.
Ask a Question
Discussion stats
  • 3 replies
  • 184 views
  • 0 likes
  • 2 in conversation