全部版块 我的主页
论坛 计量经济学与统计论坛 五区 计量经济学与统计软件
4636 7
2006-04-11

Journal of Multivariate Analysis

Volume 97

[此贴子已经被作者于2006-4-11 11:03:10编辑过]

二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

全部回复
2006-4-19 23:31:00
Dear colleagues,

I am trying to understand how SPSS (v 13) connects the fitted values of a loess curve when there is a break in the data on the abscissa.

For example, I have a point at x=100 and then nothing until x=300. Yet SPSS creates an elbow somewhere around x=150, where there are no data points that justify such a shape. It does not connect the last fitted point at x=100 to the point at x=300 with a straight line. (Using fraction=50 and the Epachnikov weight function.)

I am assuming that it extrapolates the weighted least squares line used to fit the last point on the lower end of the axis (the line moves ahead towards the upper end of the x-axis) and does the same with the first point on the upper end of the axis (the line moves towards the lower end of the x-axis). Then, at the point where the two lines have a common x value, it
draws a line to connect them (?).

I have found very little documentation either on the SPSS site or in the archive on this issue. Any answers to the question above and pointing towards some SPSS documentation on the issue would be much appreciated.



Best regards,
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2006-4-19 23:34:00

Hello, I have been trying to modify a macro from the help manual for bootstrapping equations. I would like to bootstrap samples for two equations but I would like the bootstrapped samples for equation 1 to correspond to the samples used to estimate equation 2, i.e. I would like to bootstrap B=1000 samples and run two different equations on each of the 1000 samples and I want to save the parameters from each equation in separate data files.

M = a0 + a1X

(1)Y = b0 + b1X + b2M

(2) I have been modifying the syntax but I don't know how to write macros, and I am not using the "set seed" command properly or in the right place in the macro. There may be other errors that I haven't noticed as well. I have pasted the syntax for Equation 1 that I have been using down below. If anyone can point me in the right direction I would greatly appreciate it. Lisa Lambert PRESERVE.SET TVARS NAMES.OMS /DESTINATION VIEWER=NO /TAG='SUPPRESSALL'.OMS /SELECT TABLES /IF COMMANDS=['REGRESSION'] SUBTYPES=['COEFFICIENTS'] /DESTINATION FORMAT=SAV OUTFILE='H:\ COEFF.SAV' /COLUMNS DIMNAMES=['VARIABLES' 'STATISTICS'] /TAG='REG_COEFF'. DEFINE regression_bootstrap (samples=!TOKENS(1) /depvar=!TOKENS(1) /indvars=!CMDEND) COMPUTE dummyvar=1.AGGREGATE /OUTFILE='d:\temp\med.sav' /BREAK=dummyvar /filesize=N.MATCH FILES FILE=* /TABLE='d:\temp\med.sav' /BY dummyvar.!DO !other=1 !TO !samplesSET SEED=7654321.WEIGHT OFF.FILTER OFF.DO IF $casenum=1.- COMPUTE #samplesize=filesize.- COMPUTE #filesize=filesize.END IF.DO IF (#samplesize>0 and #filesize>0).- COMPUTE sampleWeight=rv.binom(#samplesize, 1/#filesize).- COMPUTE #samplesize=#samplesize-sampleWeight.- COMPUTE #filesize=#filesize-1.ELSE.- COMPUTE sampleWeight=0.END IF.WEIGHT BY sampleWeight.FILTER BY sampleWeight.REGRESSION /STATISTICS COEFF /DEPENDENT !depvar /METHOD=ENTER !indvars.!DOEND!ENDDEFINE. GET FILE='H:\ mediation.sav'.regression_bootstrap samples=4 depvar= M indvars= X . OMSEND .

Lisa Schurer Lambert
J. Mack Robinson College of Business
Georgia State University
35 Broad Street, Room 1013
Atlanta GA 30303-4014
Phone: 404.463.9227
Email: lisalambert@gsu.edu

二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2006-4-19 23:35:00
Hi Lisa,

Is this what are you seeking?

PRESERVE.
SET TVARS NAMES.
OMS /DESTINATION VIEWER=NO /TAG='SUPPRESSALL'.
OMS /SELECT TABLES /IF COMMANDS=['REGRESSION']
SUBTYPES=['COEFFICIENTS']
/DESTINATION FORMAT=SAV OUTFILE='c:\temp\COEFF.SAV'
/COLUMNS DIMNAMES=['VARIABLES' 'STATISTICS']
/TAG='REG_COEFF'.

DEFINE regression_bootstrap (samples=!TOKENS(1)
/depvar1=!TOKENS(1)
/indvars1=!CHAREND ('/')
/depvar2=!TOKENS(1)
/indvars2=!CMDEND)

COMPUTE dummyvar=1.
AGGREGATE /OUTFILE='c:\temp\med.sav'
/BREAK=dummyvar
/filesize=N.
MATCH FILES FILE=* /TABLE='c:\temp\med.sav'
/BY dummyvar.

!DO !other=1 !TO !samples
SET SEED=7654321.
WEIGHT OFF.
FILTER OFF.

DO IF $casenum=1.
- COMPUTE #samplesize=filesize.
- COMPUTE #filesize=filesize.
END IF.

DO IF (#samplesize>0 and #filesize>0).
- COMPUTE sampleWeight=rv.binom(#samplesize, 1/#filesize).
- COMPUTE #samplesize=#samplesize-sampleWeight.
- COMPUTE #filesize=#filesize-1.
ELSE.
- COMPUTE sampleWeight=0.
END IF.

WEIGHT BY sampleWeight.
FILTER BY sampleWeight.
REGRESSION /STATISTICS COEFF /DEPENDENT !depvar1 /METHOD=ENTER
!indvars1.
REGRESSION /STATISTICS COEFF /DEPENDENT !depvar2 /METHOD=ENTER
!indvars2.
!DOEND
!ENDDEFINE.

GET FILE='C:\Program Files\SPSS\GSS93 subset.sav'.

regression_bootstrap samples=4 depvar1= opera indvars1= classicl /
depvar2= musicals indvars2= classicl opera .

OMSEND .

GET FILE='c:\temp\COEFF.SAV'.


Greetings

Jan
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2006-4-19 23:38:00

Hi everyone,

I've received some output that I don't quite understand when I run a MLR in SPSS 14.0.1.

The model-fitting information yields a chi-square of 301.67, with a sig. of .000 - which I believe indicates that the final model does a better job of describing the data than one using the intercept only. Nagelkerke's pseudo R-Square is .704. Finally, the classification table indicates that I'm correct 96.9%, 46.2%, and 68.6% of the time in terms of classifying
participants into my three groups.

All of the above seems to indicate that the model is going quite well.

However, the Goodness of Fit table indicates a significant Pearson chi-square (p=.000), while the Deviance value is 1.000. I believe that a significant result indicates a poor model fit - so I'm receiving conflicting information from this table. Having .000 'and' 1.000 doesn't seem right to me, but everything else appears to indicate that the model isn't too shabby.

Is anyone able to explain this conflict, and perhaps suggest how I might be able to resolve it?

Many thanks ..................

John

二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2006-4-19 23:39:00
There are a variety of reasons why your chi-square is high yet may not be accurate. Can you tell us more about the the models youa re testing? If you have removed a covariate from the final model or you are using non-categorical covariates, your chi-square may not be accurately
reflected. Additionally (I know this is a problem with SEM models),chi-square is notoriously sensative to sample size.Tell us more about what you are doing and we may be able to help.

Mark

二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

点击查看更多内容…
相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群