SPSS为多个变量的多元回归创建循环 [英] SPSS creating a loop for a multiple regression over several variables

查看:236
本文介绍了SPSS为多个变量的多元回归创建循环的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

对于我的硕士论文,我必须使用 SPSS 来分析我的数据.实际上,我认为我不必处理非常困难的统计问题,就我的分析概念而言,这仍然是正确的.但是现在的问题是,为了创建我的因变量,我通常需要使用语法编辑器/编程,而我在这方面完全没有经验.希望您在创建语法的过程中能对我有所帮助.

For my master thesis I have to use SPSS to analyse my data. Actually I thought that I don't have to deal with very difficult statistical issues, which is still true regarding the concepts of my analysis. BUT the problem is now that in order to create my dependent variable I need to use the syntax editor/ programming in general and I have no experience in this area at all. I hope you can help me in the process of creating my syntax.

我总共有约900家公司进行了6年的观察.对于所有这些公司,我需要以下公司特定回归的预测值:

I have in total approximately 900 companies with 6 year observations. For all of these companies I need the predicted values of the following company-specific regression:

Y= ß1*X1+ß2*X2+ß3*X3 + error

(我知道,ß不太可能很重要,但这在我的论文中无需担心,尽管会在限制中提及). 到目前为止,我的数据按以下方式排序

(I know, the ß won t very likely be significant, but this is nothing to worry about in my thesis, it will be mentioned in the limitations though). So far my data are ordered in the following way

COMPANY  YEAR X1 X2 X3

1       2002

2       2002

1       2003

2       2003

但是我可以轻松地更改顺序,例如在

But I could easily change the order, e.g. in

1

1

2

2 etc.

好,我重新整理了数据:我现在需要的是SPSS为每个公司计算特定的ß,并在一列中返回输出(这些值的预测值乘以每行中的特定X).所以我想我需要一个循环,对939家公司中的每家公司的6行进行多元线性回归,对吗?

Ok let's say I have rearranged the data: what I need now is that SPSS computes for each company the specific ß and returns the output in one column (the predicted values with those ß multiplied by the specific X in each row). So I guess what I need is a loop that does a multiple linear regression for 6 rows for each of the 939 companies, am I right?

正如我说的那样,我完全没有经验,所以每一个提示对我来说都是宝贵的.

As I said I have no experience at all, so every hint is valuable for me.

先谢谢您,

Janina.

推荐答案

请记住,每个公司只有六个观察值,并且要估计三个(或四个,如果您也有一个常数项)系数,则系数估计可能会非常不精确.您可能要考虑是否可以至少部分合并公司.

Bear in mind that with only six observations per company and three (or 4 if you also have a constant term) coefficients to estimate, the coefficient estimates are likely to be very imprecise. You might want to consider whether companies can be pooled at least in part.

这篇关于SPSS为多个变量的多元回归创建循环的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆