康卡特Bivariate(
Y( :Name( "Av_01_Age")),
X( :Name( "Av T2_Age"))
);
rev = colstoredvalue(smary,"Source_Table",1);
bal = colstoredvalue(smary,"Source_Table",2);
我如何将rev和bal中的值分别连接到x和y?
回复:concat我假设在引用为“ smary”的数据表中,有一列称为“ Source_Table”的列。 此外,第1行包含要用作X变量的数据表中一列的名称,同一列的第2行包含要用作Y变量的列的名称。 您的数据表看起来有点像

鉴于以上所述,这是使用Bivariate运行“高度”和“重量”列的代码
names default to here(1);
smary=current data table();
rev = colstoredvalue(smary,:Source_Table,1);
bal = colstoredvalue(smary,:Source_Table,2);
bivariate(
Y( column( bal) ),
X( column( rev ) )
);
我想我应该使用名称AV_01_Age和AV T2_Age代替身高和体重。
如果这不是您想要的,请提供更多详细信息,并可能提供示例数据。
回复:concat
这是我的数据的样子。
我希望它适合y的x
如果手动完成,
Bivariate(
Y( :Name( "AV_01_Age 208103-UP-1" ) ),
X( :Name( "AV_01_Age 208103-DN-1" ) )
);
我想要这样
Bivariate(
Y( :Name( "AV_01_Age ^char(up)^" ) ),
X( :Name( "AV_01_Age ^char(dn)^" ) )
);<BR /><BR />where up = 208103-UP-1<BR />dn = 208103-DN-1
回复:concat您需要做的就是简单地使用
表格=>堆栈
进行多系列堆叠,这将使您堆叠两列

然后,您可以对堆叠数据运行双变量。 下面是一个简单的脚本,其作用与交互运行时相同。 在JSL中,我可以自由地重命名Tables => Stack中出现的列,然后再运行Bivariate,因此名称更有意义
names default to here(1);
// Create your sample data table
dt=New Table( "Example",
Add Rows( 6 ),
New Column( "AV_01)Age 28103-UP-1",
Numeric,
"Continuous",
Format( "Best", 12 ),
Set Values( [3, 4, 5, 6, 12, 11] )
),
New Column( "AV_01_Age 208103-DN-1",
Numeric,
"Continuous",
Format( "Best", 12 ),
Set Values( [7, 8, 6, 3, 8, 10] ),
Set Display Width( 120 )
),
New Column( "AD_01Pref 208104-UP-1",
Numeric,
"Continuous",
Format( "Best", 12 ),
Set Values( [9, 4, 8, 6, 7, 8] )
),
New Column( "AD_01_Pref 208104-DN-1",
Numeric,
"Continuous",
Format( "Best", 12 ),
Set Values( [12, 5, 7, 9, 8, 7] )
)
);
// Stack the UP columns and the DN columns
dtStack = dt << Stack(
columns(
:Name( "AV_01)Age 28103-UP-1" ),
:Name( "AV_01_Age 208103-DN-1" ),
:Name( "AD_01Pref 208104-UP-1" ),
:Name( "AD_01_Pref 208104-DN-1" )
),
Source Label Column( "Label" ),
Stacked Data Column( "Data" ),
Number of Series( 2 )
);
// Rename the columns
dtStack:Data << set name("AV_01_Age UP");
dtStack:Data2 << set name("AV_01_Age DN");
// Run the Bivariate
dtStack << Bivariate( Y(:AV_01_Age UP),
X(:AV_01_Age DN)
);
我强烈建议您花些时间阅读称为“使用JMP”的文档。 发现于
帮助=> JMP文档库
查找名为“使用JMP”的文档
回复:concat只是一个简短的说明 @ skyzvoir0001 在表中,第三列是字符。(它向左对齐)。并且所有其他列均为数字(右对齐)。 对于每个表,应将要合并或堆叠的列设置为相同的数据和建模类型。 特别是如果您打算在下一步中对列进行回归。如果一列应该是数字及其字符,那么您将获得ANOVA而不是双变量报告。
这是我处理此问题的方法:
tables = {dtcon, dtrec, dtdea}; //list of the tables I need to format
For( ii = 1, ii <= N Items( tables ), ii++, // this outside loop is for each table
For( i = 3, i <= N Cols( tables[ii] ), i++, // this inside loop is for each col in each table
// i=3 because I want every column after the 3rd col to be formatted.
Column( tables[ii], i ) << Set Data Type( "Numeric" );
Column( tables[ii], i ) << Set Modeling Type( "Continuous" );
)
);