我对此有一些问题,在尝试提取线性拟合参数时我不断收到错误。
我有一个标准的 YvsX 数据集,但有 4 个不同的“分组依据”列。 当我尝试进行提取时(我尝试了很多不同的方法),我不断收到这样的错误:
任何想法这是怎么回事? 我尝试将四个列连接成一列,然后按该单个连接拆分,但仍然出现错误。
//make report
biv = Bivariate(
Y( :Y ),
X( :X ),
By( :A, :B, :C, :D</img> ),
Fit Line( {Line Color( "Red" )} )
);
//list the reports
rbiv = biv << report;
//count the number of reports
nBy = N Items( rbiv );
//array of as many rows as reports. 1col, all set to zero.
vc = J( nBy, 1, 0 );
//Create output table and fill with estimates
dtOut = New Table( "Regression parameters",
New Column( "Group", Character ),
New Column( "Intercept", numeric ),
New Column( "Slope", numeric ),
addrows( nBy ));
//grab the values
For( j = 1, j <= nBy, j++,
Estimates = rbiv[j]["Linear Fit"]["Parameter Estimates"][1][3] << get as matrix;
:Group[j] = groups[j];
:Intercept[j] = Estimates[1];
:Slope[j] = Estimates[2]);


