passare in rassegna i nomi delle colonne ed eseguire un adattamento bivariato con alcuni di essi, inclinazione di output e valore R al quadratoIl post pertinente è qui,
Ho molte colonne e non voglio includerne alcune nell'analisi. Quindi ho bisogno di scorrere i nomi delle colonne e scegliere quelli di cui ho bisogno e fare un adattamento bivariato.
Quindi, seguendo la soluzione sul post sopra
L'ho fatto
NamesDefaultToHere(1);
dt = Open("$SAMPLE_DATA/Fishing.jmp");
colList = dt << get column names( string );
For( i = 1, i <= N Items( colList ), i++,
If( ! Contains( colList[i], "Validation") & ! Contains( colList[i], "People") ,
biv = Bivariate(invisible,
Y( :Fish Caught ),
X( :i),
Fit Line( {Line Color( "Medium Dark Red" )} ),
By( :Validation )
))
dtR2 = report(biv[1])["Summary of Fit"][tablebox(1)]<< make combined data table;
dtR2 = report(biv[1])["Summary of Fit"][tablebox(1)]<< make combined data table;
dtSlope = report(biv[1])["Parameter Estimates"][tablebox(1)]<< make combined data table (invisible);
dtR2 << select where(:Column 1 != "RSquare");
dtR2 << delete rows;
dtR2:Column 2 << set name("RSquare");
dtR2 << delete Columns({"Validation 2","Column 1"});
dtSlope << select where(:Term == "Intercept");
dtSlope << delete rows;
dtSlope:Estimate << set name( "Slope");
dtSlope << delete columns({"Validation 2","Term","~Bias","Std Error","t Ratio","Prob>|t|"});
// Put the data together
dtR2 << Update(
With( dtSlope ),
Match Columns( :Validation = :Validation, :X = :X, :Y = :Y )
);
// Clean up the items not needed
close(dtSlope, nosave);
window("Fishing - Bivariate of Fish Caught") << close window;
);
ma sembra che non sia sicuro di come implementarlo correttamente.
Ri: scorrere tra i nomi delle colonne ed eseguire adattamenti bivariati con determinati nomi, inclinazione di output e valore R al quadratoQualcuno del personale di Jmp può aiutarmi con questo problema?
Ri: scorrere tra i nomi delle colonne ed eseguire adattamenti bivariati con determinati nomi, inclinazione di output e valore R al quadratoNames Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Fishing.jmp" );
col = dt << Get Column Names( Numeric, String );
For( c = N Items( col ), c > 0 , c--,
If( col[c] == "Fish Caught", Remove From( col, c ) );
If( col[c] == "Validation", Remove From( col, c ) );
If( col[c] == "People", Remove From( col, c ) );
);
biv = dt << Bivariate(
Y( :Fish Caught ),
X( Eval( col ) ),
By( :Validation ),
Fit Line
);
biv rep = biv << Report;
summary dt = biv rep[1]["Summary of Fit"][TableBox(1)] << Make Combined Data Table;
parameter dt = biv rep[1]["Parameter Estimates"][TableBox(1)] << Make Combined Data Table;
Wait( 0 );
biv << Close Window;
Column( summary dt, 6 ) << Set Name( "RSquare" );
summary dt
<< Select Where( Contains( :Column 1[], "RSquare" ) & Not( Contains( :Column 1[], "Adj" ) ) )
<< Invert Row Selection
<< Delete Rows
<< Delete Columns( { "Y", "Validation 2", "Column 1" } );
Column( parameter dt, 7 ) << Set Name( "Slope" );
parameter dt
<< Select Where( Contains( :Term[], "Intercept" ) )
<< Delete Rows
<< Delete Columns( { "Y", "Validation 2", "Term", "~Bias", "Std Error", "t Ratio", "Prob>|t|" } );
summary dt << Join(
With(parameter dt ),
Select( :Validation, :X, :RSquare ),
SelectWith( :Slope ),
By Row Number
);
Close( summary dt, No Save );
Close( parameter dt, No Save );Ri: scorrere tra i nomi delle colonne ed eseguire adattamenti bivariati con determinati nomi, inclinazione di output e valore R al quadratoQuesta soluzione ti è stata di aiuto?
Ri: scorrere tra i nomi delle colonne ed eseguire adattamenti bivariati con determinati nomi, inclinazione di output e valore R al quadratosi segno, mi spiace per il ritardo