cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
JMP is taking Discovery online, April 16 and 18. Register today and join us for interactive sessions featuring popular presentation topics, networking, and discussions with the experts.
Choose Language Hide Translation Bar
tomerFire
Level II

"Specified Column not found in data table" in Fit Model using JSL

I have a script that makes a Fit Model from a table I import.

 

My problem is that I get this error when accessing the data.


"Specified Column not found in data table.{4759} in access or evaluation of 'List' , {/*###*/data:T_VALUE}"

 

When I try to access the column through "Show" I get good results:

"data:T_VALUE = 1;"

 

My code:

 

 

data = Open( "C:/Users/taviad/Desktop/Sheet1.jmp" );


					Show(data:T_VALUE);
					
					model = data << Fit Model(
					Y( data:T_VALUE ),
					Effects(
						data:x,
						data:y,
						data:z,
						data:c
					),
					Personality( "Standard Least Squares" ),
					Emphasis( "Minimal Report" ),
					Run(),
					Where( data:b == "param1" & data:n == "param2" ),
					
				);

 

 

Thanks.

1 ACCEPTED SOLUTION

Accepted Solutions
tomerFire
Level II

Re: "Specified Column not found in data table" in Fit Model using JSL

I managed to solve it be resaving the data on a new file. I dont know what was the problem but the original file was not good.

View solution in original post

7 REPLIES 7
txnelson
Super User

Re: "Specified Column not found in data table" in Fit Model using JSL

It is possible that JMP has not finished opening your data table, when it is going ahead and running the Fit Model.  If that is the case, by adding in a Run Formulas request will force JMP to complete the Open() function, and should fix the issue.

data = Open( "C:/Users/taviad/Desktop/Sheet1.jmp" );
data << run formulas;
					
model = data << Fit Model(
	Y( data:T_VALUE ),
	Effects( data:x, data:y, data:z, data:c ),
	Personality( "Standard Least Squares" ),
	Emphasis( "Minimal Report" ),
	Run(),
	Where( data:b == "param1" & data:n == "param2" ), 
					
);

 

Jim
tomerFire
Level II

Re: "Specified Column not found in data table" in Fit Model using JSL

Hi, thanks for the answer.
I tried it and I got the same error:

data:T_VALUE = 1;

Specified Column not found in data table.{4759} in access or evaluation of 'List' , {/*###*/data:T_VALUE}

Re: "Specified Column not found in data table" in Fit Model using JSL

Is T_VALUE a data column or a table variable? Fit Least Squares requires a data column in the Y role.

tomerFire
Level II

Re: "Specified Column not found in data table" in Fit Model using JSL

Its a column. It is ok like this?

gzmorgan0
Super User (Alumni)

Re: "Specified Column not found in data table" in Fit Model using JSL

The log messages you reported look strange.

  • "Specified Column not found in data table.{4759} in access or evaluation of 'List' , {/*###*/data:T_VALUE}" this is not the error message I get if I specify a column that does not exist. This looks like an error message when you have a list specified for Y 
  • When I try to access the column through "Show" I get good results:   "data:T_VALUE = 1;" This will occur when T_VALUE is a table variable and no column with that name exists
  • This is the results of a Show when data has a column with that name  is "data:T_VALUE = .;"

Just in case your column name is read in with a CR or tab you might want to try the script below, it removes leading and trailing spaces and tabs and line feeds and carriage returns(new line)

for(i=1, i<=ncol(data), i++,
	column(data,i) << set name( Trim( column(data,i) << get name) );
);

 

Re: "Specified Column not found in data table" in Fit Model using JSL

I just don't undestand the error: "T_VALUE = 1". That makes it look like a scalar value, not a column.

tomerFire
Level II

Re: "Specified Column not found in data table" in Fit Model using JSL

I managed to solve it be resaving the data on a new file. I dont know what was the problem but the original file was not good.