Running Code as a Simulation in Minitab

J

jiao88

#1
Hi all,

I am new to Minitab. Refer to my code, if I were to run the code as simulation for like 1000 time, how can I store the 1000 results for my coefficient every time I run it? My current code will replace the coefficient to the latest coefficient only :truce: Please advice. :eek:


Name C1 "u"
Name C2 "t"
Name C4 "x"
Name C5 "COEF1"
Name C6 "SECO1"
Name C7 "CLCO1"
Name C8 "CLCO2"

Random 20 c1;
Uniform 0.0 1.0.
Random 20 c4;
Normal 0.0 1.0.

let c2=exp(0.4*log(-log(1-u))+3+3*x)

Lregression 't'=x;
Weibull;
Coefficient 'COEF1';
Secoefficient 'SECO1';
Clcoefficient 'CLCO1'-'CLCO2';

Brief 2;
Confidence 95.0.

let k1=1
let k2=10
let Ck2(1)=C5(1)
let Ck2(2)=C5(2)
let Ck2(3)=C5(3)

let k1=k1+1
let k2=k2+1
 
Elsmar Forum Sponsor
A

Allattar

#3
Try stacking it into a new columns using the stack command.

Then build a subscript column to identify the run number.
 
J

jiao88

#4
If I use the stack command, meaning I need to list out all the result for 1000 replications before I stack it? or I can still stack it into 1 column even though I do not have the result for 1000 replications?
 
J

jiao88

#5
My current way of running a simulation is just execute the .mtb file for 1000 times. But seems like the part

let k1=1
.
.

let k1=k1+1

didnt run at all. Is my way of doing simulation is wrong? :confused::confused:
 
S

steelejc15425

#7
I agree with Wang1568, you will need a macro to do the loop.

You can get more information from Help > Help >Macros (select on left side).

I think this will get you started though. Notice that your file has to start with gmacro, followed by a name for the macro, and that your file has to end with endmacro.

To run your macro, you will have to have your cursor in the white window (Session Window), then on the menus click Editor > Enable Commands.

If you save it in the Minitab macros folder, you can invoke it by typing the name after a % symbol. Otherwise, type the full file path after a % symbol:
%C:\Users\you\sample.mac

where you type your file name instead of sample.mac.

Let us know if you get stuck!

gmacro
macroname

Name C1 "u"
Name C2 "t"
Name C4 "x"
Name C5 "COEF1"
Name C6 "SECO1"
Name C7 "CLCO1"
Name C8 "CLCO2"
let k1=1
let k2=10

do k1 =1:10 10
Random 20 c1;
Uniform 0.0 1.0.
Random 20 c4;
Normal 0.0 1.0.
let c2=exp(0.4*log(-log(1-u))+3+3*x)
Lregression 't'=x;
Weibull;
Coefficient 'COEF1';
Secoefficient 'SECO1';
Clcoefficient 'CLCO1'-'CLCO2';

Brief 2;
Confidence 95.0.
let Ck2(1)=C5(1)
let Ck2(2)=C5(2)
let Ck2(3)=C5(3)

let k2=k2+1
enddo
endmacro
 
Thread starter Similar threads Forum Replies Date
C Perry Johnson Running for Governor of Michigan Coffee Break and Water Cooler Discussions 21
S Measurement Plan for a Running Process Parameter Quality Manager and Management Related Issues 3
Z Help with running 3 factor DOE factor optimization Using Minitab Software 2
Marc Running Great Britain? There's an App For That! After Work and Weekend Discussion Topics 4
Q Temporary Control of Scrap at the Machines while the Process is Running Nonconformance and Corrective Action 6
E How to start running a successful 5S program? Lean in Manufacturing and Service Industries 11
G Histogram Interpretation when a process is "running too high" or "running too low"? Quality Tools, Improvement and Analysis 4
N Dehumidified (Dry) Cleanroom - Running a Cleanroom at very low RH Manufacturing and Related Processes 23
Claes Gefvenberg Firefox 4 up and running. After Work and Weekend Discussion Topics 6
Marc The Eight States Running Out Of Home Buyers World News 2
Marc Rut Row - Water running low in LA - What does this mean? Feb 2008 World News 0
T Running a DOE when defects are < 50 PPM Quality Tools, Improvement and Analysis 8
A Running MRP and Kanban on the same blank/part - Is this possible? Lean in Manufacturing and Service Industries 3
Q Manager's version of the process contradicts personnel running the process General Auditing Discussions 20
G Running simulations using Bernoulli Distributions with a certain probability. Using Minitab Software 5
BradM Running two monitors on one computer - Dual View After Work and Weekend Discussion Topics 9
Q Is running a CMM machine part of a job title or is it a field in itself Training - Internal, External, Online and Distance Learning 3
B Keeping your Windows PC running Smoothly After Work and Weekend Discussion Topics 18
K Running Change Drawing Control - Timing aspect of the release of these documents Document Control Systems, Procedures, Forms and Templates 1
W Employee Personal Liability once we get our ISO 14001 up and running ISO 14001:2015 Specific Discussions 1
T Group checkout with bar code Using GAGEpack Software 1
G Storing Source Code and Coding Platform Other Medical Device and Orthopedic Related Topics 2
H Resin Identification Code Applicability REACH and RoHS Conversations 1
H Marking of Resin Identification Code CE Marking (Conformité Européene) / CB Scheme 0
T Link GMDN code and FDA product code US Medical Device Regulations 5
C What Theory is MIL-STD-105E Sample Size Code Letters Based on? Quality Tools, Improvement and Analysis 3
D 62304 code review, unit test, integration test example IEC 62304 - Medical Device Software Life Cycle Processes 2
S Submit under a new product code in a 510k? US Medical Device Regulations 5
Q NACE Code 25.6 no reduction in CB audit days? ISO 9000, ISO 9001, and ISO 9004 Quality Management Systems Standards 23
L What is NAICS Code? General Information Resources 5
J GMDN CODE FOR nonpneumatic antishock garment ISO 13485:2016 - Medical Device Quality Management Systems 0
Forum Administrator Code of Conduct Elsmar Cove Forum ToS and Forum Policies 0
S Product Code 510(k) exemption US Food and Drug Administration (FDA) 1
R GS1 DataMatrix code does not meet GS1 Specification EU Medical Device Regulations 0
D GMDN Code 12873 ISO 13485:2016 - Medical Device Quality Management Systems 1
JoCam GMDN code in Declaration of Conformity EU Medical Device Regulations 4
B Document Issued with incorrect Document number code Document Control Systems, Procedures, Forms and Templates 3
J Marking "Distributed By" to product with distributors' reference-code EU Medical Device Regulations 3
John Broomfield CIOB - Code of Quality Management Misc. Quality Assurance and Business Systems Related Topics 1
Z Labeler Code - Private labelling for OTC (Over the Counter) Pharmaceuticals (21 CFR Part 210, 21 CFR Part 211 and related Regulations) 0
D GMDN code update - Canada - Do you know if there is guidance? Canada Medical Device Regulations 0
K IEC 62304 compliance - Code reviews as part of verification strategy IEC 62304 - Medical Device Software Life Cycle Processes 5
C Brazil - Product Code (and brand) Change Other Medical Device Regulations World-Wide 1
Marc Medical device vulnerability highlights problem of third-party code in IoT devices Other Medical Device and Orthopedic Related Topics 1
MDD_QNA QR Code Standard ISO/IEC 15417:2007 - Does anyone use it? Other Medical Device Related Standards 3
K REF symbol with product code in the IFU EU Medical Device Regulations 1
DitchDigger Boston Fire Code: Who Does What? (CAL TB 117-2013; CAL TB 133) Occupational Health & Safety Management Standards 2
John Broomfield Informational Chartered Institute of Building - Code on Quality Management Service Industry Specific Topics 2
K REF code and Consult IFU in Shipping carton boxes. EU Medical Device Regulations 1
S GMDN Code for Chitosan Products CE Marking (Conformité Européene) / CB Scheme 1

Similar threads

Top Bottom