How to test for statistical significance with multiple visits and technical replicates? I have a data set  with 100 columns that's divided between 40 normal columns and 60 MI columns. Samples from each patient were taken at two separate visits, and each sample has two technical replicates.
How would I do this?  How can I build a model that takes this design into account in order to check for significant difference between the normal and case patients?
 A: 
However this solution doesn't take into account the two replicates for each visit or separate visits. 

Correct.

How would I do this? 

You need to account for repeated visits for each patient, and for repeated replicates within each visit for each patient. This is because measurements for the same patient are likely to be be more similar to  measurements from other patients, and replicates for a patient's visit are likely to be more similar to each other than replicates for the same patients other visit.
One way to do this is with a mixed effects model, with random intercepts for patient, and also for visit.
In order to do this you will need to reformat your data into "long" format, where each row in the data corresponds to one measurement. So you will have 4 rows for each patient. Then you will have columns (variables) indicating the patient ID, the visit, replicate ID and an indicator for normal/MI. Something like this:
PatientID VisitID ReplicateID MI Value

A          1         1        1   1.0
A          1         2        1   1.1
A          2         1        1   2.0
A          2         2        1   1.6
B          1         1        0   0.2
B          1         2        0   0.3
B          2         1        0   0.2
B          2         2        0   0.5

In R, using syntax for the lme4 package you would use the following formula:
lmer(Value ~ MI + (1 | PatientID/VisitID), data = .... )

Your interest will centre on the estimate for MI, and you should check tjhat the model residuals are approximately normally distributed.
