To know the power or ... is the question [Software]
Dear Pavan,
Answer to question 2: Not any, many!
Answer to question 1: see answer to question 2.
Hint: If you can analyze your data correctly within the 'ANALYST' application in SAS have a look at the code generated by it. It is shown below the analysis results. The emphasis lies on correctly! So use test data with known results.
To shorten the process of repeated Q&A here in this forum, which is not a SAS forum:
Steps to follow
1. Prepare a dataset with your y and x data.
2. Define an additional variable with the x value squared (f.i. x2=x*x;)
3. Define variables with your weights (f.i. w1=1/x; w2=1/(x*x);)
4. Code:
BTW: I strongly recommend that you attend a basic SAS course or buy a beginners SAS book! Ok, both are not cheap. So have a look at preceedings of SAS User conferences found here with many beginners lessions.
BTW2: For the other members of this forum interested in coding: See the elegant and intuitive way in doing polynomial regression in SAS. In another piece of this great software Proc GLM the same model is written
It is a programming language of the 4th generation
!
❝ *** Simple Regression ***;
❝ options pageno=1;
❝ proc reg data=Work.Sas;
❝ model Y = B;
❝ run; quit;
❝ note: B=1/x2
❝
❝ Now my questions are,
❝ 1) Why my SAS R2 values are different compared to the Analyst R2 values?
❝ 2) Is there any mistake in my calculation?
Answer to question 2: Not any, many!
Answer to question 1: see answer to question 2.
Hint: If you can analyze your data correctly within the 'ANALYST' application in SAS have a look at the code generated by it. It is shown below the analysis results. The emphasis lies on correctly! So use test data with known results.
To shorten the process of repeated Q&A here in this forum, which is not a SAS forum:
Steps to follow
1. Prepare a dataset with your y and x data.
2. Define an additional variable with the x value squared (f.i. x2=x*x;)
3. Define variables with your weights (f.i. w1=1/x; w2=1/(x*x);)
4. Code:
*linear model
Proc reg data=yourdata;
model y=x;
weight w1; *if weighted by 1/x
run;quit;
*quadratic model
Proc reg data=yourdata;
model y=x x2;
weight w2; *if weighted by 1/x2
run;quit;BTW: I strongly recommend that you attend a basic SAS course or buy a beginners SAS book! Ok, both are not cheap. So have a look at preceedings of SAS User conferences found here with many beginners lessions.
BTW2: For the other members of this forum interested in coding: See the elegant and intuitive way in doing polynomial regression in SAS. In another piece of this great software Proc GLM the same model is written
model y=x x*x; Sic!It is a programming language of the 4th generation
!—
Regards,
Detlew
Regards,
Detlew
Complete thread:
- Quadratic Regression / SAS NPavan 2009-01-27 07:53
- Proc Reg - The power to know d_labes 2009-01-27 08:26
- Proc Reg NPavan 2009-01-28 11:41
- To know the power or ... is the questiond_labes 2009-01-28 13:53
- Linear and Quadratic Regression NPavan 2009-01-29 11:42
- Model selection Helmut 2009-01-29 13:54
- Model selection NPavan 2009-01-30 12:14
- Model selection Helmut 2009-01-29 13:54
- Linear and Quadratic Regression NPavan 2009-01-29 11:42
- To know the power or ... is the questiond_labes 2009-01-28 13:53
- Proc Reg NPavan 2009-01-28 11:41
- Proc Reg - The power to know d_labes 2009-01-27 08:26
