Bivariate regression using loop

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Bivariate regression using loop

sowmya sankar
Hi,

I have a dataset with 5 columns: Code, Type, Site, Month, Count. I am trying
to run bivariate regression with month as independent variable and count as
dependent variable for each website, within eaach type, within each code.
Code, Type and Site are categorical variables. I am able to filter and run
regression based on just one variable (either Site or Type or Code) but when
I try 3 nested filters, it does not work. what would be a good way to
achieve this? The sample data looks like below: (This should generate 6
regression models for the possible combinations of Code, Type and Site)
CodeType  Site Month  Count
1       1       1       9       12
1       1       1       10      23
1       2       3       11      19
1       2       3       12      31
2       2       4       4       11
2       2       4       5       14
2       5       1       1       15
2       5       1       2       13
2       5       8       9       20
2       5       8       11      21
3       5       9       11      33
3       5       9       12      34

Thanks!
S

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: Bivariate regression using loop

Melissa Ives
Can you calculate a variable for the code/type/site combinations and
then use split file to run your regression?
E.g.
Compute cts=(code*100)+(type*10)+site.
Sort cases by cts.
Split file by cts.
Regression...

Melissa

-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of
sowmya sankar
Sent: Friday, February 29, 2008 4:17 PM
To: [hidden email]
Subject: [SPSSX-L] Bivariate regression using loop

Hi,

I have a dataset with 5 columns: Code, Type, Site, Month, Count. I am
trying to run bivariate regression with month as independent variable
and count as dependent variable for each website, within eaach type,
within each code.
Code, Type and Site are categorical variables. I am able to filter and
run regression based on just one variable (either Site or Type or Code)
but when I try 3 nested filters, it does not work. what would be a good
way to achieve this? The sample data looks like below: (This should
generate 6 regression models for the possible combinations of Code, Type
and Site) CodeType  Site Month  Count
1       1       1       9       12
1       1       1       10      23
1       2       3       11      19
1       2       3       12      31
2       2       4       4       11
2       2       4       5       14
2       5       1       1       15
2       5       1       2       13
2       5       8       9       20
2       5       8       11      21
3       5       9       11      33
3       5       9       12      34

Thanks!
S

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command SIGNOFF SPSSX-L For a list
of commands to manage subscriptions, send the command INFO REFCARD


PRIVILEGED AND CONFIDENTIAL INFORMATION
This transmittal and any attachments may contain PRIVILEGED AND
CONFIDENTIAL information and is intended only for the use of the
addressee. If you are not the designated recipient, or an employee
or agent authorized to deliver such transmittals to the designated
recipient, you are hereby notified that any dissemination,
copying or publication of this transmittal is strictly prohibited. If
you have received this transmittal in error, please notify us
immediately by replying to the sender and delete this copy from your
system. You may also call us at (309) 827-6026 for assistance.

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: Bivariate regression using loop

Peck, Jon
Or just split by all three variables.

-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Melissa Ives
Sent: Friday, February 29, 2008 3:22 PM
To: [hidden email]
Subject: Re: [SPSSX-L] Bivariate regression using loop

Can you calculate a variable for the code/type/site combinations and
then use split file to run your regression?
E.g.
Compute cts=(code*100)+(type*10)+site.
Sort cases by cts.
Split file by cts.
Regression...

Melissa

-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of
sowmya sankar
Sent: Friday, February 29, 2008 4:17 PM
To: [hidden email]
Subject: [SPSSX-L] Bivariate regression using loop

Hi,

I have a dataset with 5 columns: Code, Type, Site, Month, Count. I am
trying to run bivariate regression with month as independent variable
and count as dependent variable for each website, within eaach type,
within each code.
Code, Type and Site are categorical variables. I am able to filter and
run regression based on just one variable (either Site or Type or Code)
but when I try 3 nested filters, it does not work. what would be a good
way to achieve this? The sample data looks like below: (This should
generate 6 regression models for the possible combinations of Code, Type
and Site) CodeType  Site Month  Count
1       1       1       9       12
1       1       1       10      23
1       2       3       11      19
1       2       3       12      31
2       2       4       4       11
2       2       4       5       14
2       5       1       1       15
2       5       1       2       13
2       5       8       9       20
2       5       8       11      21
3       5       9       11      33
3       5       9       12      34

Thanks!
S

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command SIGNOFF SPSSX-L For a list
of commands to manage subscriptions, send the command INFO REFCARD


PRIVILEGED AND CONFIDENTIAL INFORMATION
This transmittal and any attachments may contain PRIVILEGED AND
CONFIDENTIAL information and is intended only for the use of the
addressee. If you are not the designated recipient, or an employee
or agent authorized to deliver such transmittals to the designated
recipient, you are hereby notified that any dissemination,
copying or publication of this transmittal is strictly prohibited. If
you have received this transmittal in error, please notify us
immediately by replying to the sender and delete this copy from your
system. You may also call us at (309) 827-6026 for assistance.

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD