DF <- data.frame(x1=1:6, x2=rep(1:2, 3), y=rep(1:3, 2))
lm(y-x1~x2-1, DF)The formula "y-x1~x2-1" fits a noconstant model, specified by the "-1" of y-x1 regressed on x2.
Does this answer the question? spencer graves
umeno wrote:
Hi,
I would like to know if anyone has any idea of how to run an OLS with
constraints? I need to contraint a coefficient estimate in the model equal to 1, and I am not sure how to include it into the OLS estimation...
I was hoping to find something like "cnsreg" in STATA..
thank you Soyoko
______________________________________ Ms. Soyoko Umeno Graduate Research Assitant for the Illinois-Missouri Biotechnology Alliance (IMBA) at http://www.imba.missouri.edu/ Ph.D. Student at the Department of Agricultural and Consumer Economics at the University of Illinois at Urbana-Champaign Office Phone: 217-333-3417 or 217-333-0364 Fax: 217-244-4817 Mailing Address: 1301 W. Gregory Dr. MC710, Urbana, IL 61801
______________________________________________
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
______________________________________________ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
