Multiple regression with binary predictors. Component value analysis I have the data about process duration (in minutes) and components (procedures) done during it like this (CSV):

id,time,p1,p2,p3,p4
1,30,1,0,0,0
2,32,1,0,0,0
3,56,1,1,0,0
4,78,1,1,0,1
5,78,1,1,0,1
6,100,1,1,1,1
7,98,0,1,1,1

I need to estimate the duration of each component(procedure) 
I want to get something like this:
component,timeMax,timeMin,timeAverage,timeSD,samples
p1,...
p2,....
p3,...
p4,....

Note: I need the estimated time of procedures not time of processes where procedure was used. 
I think the solution shold initially group all combinations first and then 
simple procedures (1 process = 1 procedure ) time shuld be evaluated
$$t_1 = 30$$ #id=1
$$t_1 = 32$$ #id=2
then more complex actions should be performed: for example, time of procedure 2 (from sample) could be calculated by subtraction: 
$$t_1 = \sum{(t_1+t_2+t_3+t_4)} - \sum{(t_2+t_3+t_4)} = 100 - 98 = 2$$ # id 6 - 7
$$t_2 = \sum{(t_1+t_2)} - t_1 = 56 - 30\pm1 = 26\pm1$$ #id 3 - (1,2)
$$t_3 = \sum{(t_1+t_2+t_3+t_4)} - \sum{(t_1+t_2+t_4)} = 100 - 78 = 22$$ # id 6 - 5
$$t_4 = \sum{(t_1+t_2+t_4)} - \sum{(t_1+t_2)} = 78 - 56 = 22$$ #id 4 - 3
then average, SD, Min,Max for all $t_i$ is calculated.
If there are several procedures are always combined time for each is calculated by dividing combination time by combination size. I think this procedure should be performed only before result output.
May be also some kind of correction for procedures that are performed during this sequence.
May be there should be iteration limit, or stop condition then last iteration brings no or <1% result change in comparison with previous one.
The second part is to compare procedure times when it is done separately and in combination with others. And to estimate most effective (reducing total time) and ineffective (increasing total time) procedure combinations.
The question is:


*

*How to achieve this?

*What methods should/could be used?

*What statistical software could be used for this task?

 A: I don't think the problem, as is, is well-defined. You mention the possibility that the duration of each operation may vary if done in combination with others. If that's the case, the "duration of operation" is not defined. E.g. in your example, op1 time is 30-32 min, and you say "therefore op2 time is 24-26 min", but how do you know that? Maybe op1, when done together with op2, takes only 10 min and op2 takes the remaining 46 min. So you'd need some more assumptions to figure out individual durations from such data.
If you assume the operations are independent, then it seems that an easy first step would be to build a set of linear equations. In your example, the first three equations would be:
$$t_1 = 30$$
$$t_1 = 32$$
$$t_1 + t_2 = 56$$
Then solve it (in the least squares sense). The way to solve it is probably using linear regression, with operation durations as independent variables and the process times as (known) dependent variables. Standard regression solvers will give you all kinds of estimates of variance. 
Solution for R: 
d <- read.table("data.csv",header=T,sep=",") # read data
r <- lm(time ~ 0+p1+p2+p3+p4, data=d) # multiple linear regression 
summary(r) #result output

A: Software:
I advice to use R because it is free and designed for data analysis.
http://cran.r-project.org/
About your first question, the R code to answer it, is the following (I suppose that your data are in the file "data.csv")
# load the file "data.csv"
d <- read.table("data.csv",header=T,sep=",")

# create a data frame for the results
res <- data.frame(component=paste("op",1:(ncol(d)-2),sep=""),timeMax=rep(0,ncol(d)-2),timeMin=rep(0,ncol(d)-2),timeAverage=rep(0,ncol(d)-2),timeSD=rep(0,ncol(d)-2),samples=rep(0,ncol(d)-2))

# loop over the operations
for (ind in 3:ncol(d))
    {
    res[ind-2,2:6]<-c(max(d$time*d[,ind]),min(d$time*d[,ind]),mean(d$time*d[,ind]),sd(d$time*d[,ind]),sum(d[,ind]))
    }

For the question about the combinations, you could use the same trick by replacing
d$time*d[,ind]
by
d$time*d[,ind1]*d[,ind2]
if you want to obtain statistics about the combination of op1 and op2. But if you have many op, this is maybe not suited to your case as the number of combinations is equal to 2^N... Is N large? Do you want statistics about all the possible combinations or only about some of them?
