I have run this unconstrained regression
*Model: lcost=ß_1+ß_2loutput+ ß_3plabor+ ß_4lcapital+ß_5lpfuel

and would like to set the restriction : R = (0, 0, 1, 1, 1) to test hypothesis P labor + βP capital + βP fuel = 1
I defined matrices for R and r
Code:
matrix R_c = (0,0,1,1,1)
gen r=1
I need to test the null hypothesis of homogeneity based on the F ratio formula using SSR for restricted and unrestricted regression (F-stat=(SSRrestr. − SSRunres./#r)/SSRunres /(n-k)) or based on multiplying the matrices of restriction and coefficients Rß to use the other formula to manually calculate F-stat

How to best do this?
I used this code below but apparently there is an error
Code:
reg lcost loutput lplabor lcapital lpfuel
constraint 3 _b[lpfuel]=_b[lplabor]=_b[lcapital]=1

 cnsreg lcost loutput lplabor lcapital lpfuel, constraints(3)