Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Spss syntax help please

46 views
Skip to first unread message

indian saint

unread,
Dec 9, 2009, 4:31:54 AM12/9/09
to
I have one variable with more than thousand observations.
I need 100 random samples of size 5.
Then I need a new variable contains sum of each sample.That is new
variable will consist of 100 observations.

Can anyone help me pls...........

Art Kendall

unread,
Dec 9, 2009, 8:05:50 AM12/9/09
to
open a new instance of SPSS. Copy and paste the syntax below into a
syntax window.
Is this what you want to do?

* make up data.
new file.
set seed = 20091209.
INPUT PROGRAM.
LOOP id=1 TO 1000.
COMPUTE existingvar = rv.normal(0,1).
END CASE.
END LOOP.
END FILE.
END INPUT PROGRAM.
FORMATS id (F4.0) existingvar (f6.3).
descriptives variables = existingvar /statistics = all.
* now have data analogous to your description.
compute ranvar= rv.uniform(0, 2e31).
sort cases by ranvar.
compute newsequence= $casenum.
select if newsequence le 500.
compute samplegroup = mod(newsequence,100) +1.
frequencies vars= samplegroup.
dataset declare aggfile.
aggregate outfile = aggfile /break = samplegroup
/meanexistingvar= mean(existingvar).
dataset activate aggfile.
descriptives variables= meanexistingvar /statistics= all.

Art Kendall
Social Research Consultants

Art Kendall

unread,
Dec 9, 2009, 8:10:06 AM12/9/09
to
That example syntax draws the samples without replacement of the cases
into the pop for the next draw.

Art Kendall
Social Research Consultants

indian saint

unread,
Dec 9, 2009, 11:27:51 PM12/9/09
to
On Dec 9, 6:10 pm, Art Kendall <A...@DrKendall.org> wrote:
> That example syntax draws thesampleswithout replacement of the cases

> into the pop for the next draw.
>
> Art Kendall
> Social Research Consultants
>
> indian saint wrote:
> > I have one variable with more than thousand observations.
> > I need 100randomsamplesof size 5.

> > Then I need a new variable contains sum of each sample.That is new
> > variable will consist of 100 observations.
>
> > Can anyone help me pls...........

Thank you very much for your help. But the programme gives sample
without replacement.I need with replacement.

Bruce Weaver

unread,
Dec 10, 2009, 7:22:48 AM12/10/09
to

See if this helps:

http://groups.google.com/group/sci.stat.consult/msg/710ea4ab83ddf24a?dmode=source

I used the code posted there to sample with replacement in order to
create a demonstration of the sampling distribution of the mean.

--
Bruce Weaver
bwe...@lakeheadu.ca
http://sites.google.com/a/lakeheadu.ca/bweaver/Home
"When all else fails, RTFM."

indian saint

unread,
Dec 16, 2009, 12:58:37 AM12/16/09
to
thanks yar,let me check it.

Message has been deleted

Bruce Weaver

unread,
Mar 20, 2013, 2:25:15 PM3/20/13
to
Apologies for top-posting, but it seemed appropriate under the
circumstances!

Yafaa, you posted exactly the same message with subject line "PLS
regression etc.". Posting it twice is not helpful.

Also, you might have better luck at the SPSSX-L mailing list, which is
far more active than this newsgroup these days. The mailing list can be
viewed here:

http://spssx-discussion.1045642.n5.nabble.com/

Notice that if you post via Nabble, you can include attachments
(although they will only be available to people who read the list via
Nabble).

HTH.


On 19/03/2013 9:58 PM, ahres...@gmail.com wrote:
> Dear group members,
>
> I am very happy to see that people can actually progress in their work and get few advices online to use SPSS effectively!
>
> I am Yafaa sofia Ahres, currently working on a Project for my MSc. I have to use SPSS and the PLS Regression too. I would like to get few advices and guidelines as I never used this before. I have the Julie Pallant's Book ''SPSS Survival Manual'' it's a huge help, I know how to do many things on SPSS now thanks to her; but unfortunately there's no chapter for PLS Regression ... Therefore, if anyone can share his/her knowledge and expertise that will be great.
>
>
> I am basically following the Framework/ Research Methodology of Reinartz et al. (2004; see article below via Web-link ===>
>
> http://www.management.imu.unibe.ch/content/e6586/e6643/e6586/e6643/e6647/2004-12-21_krafft.pdf
>
>
> • A dependent variable is named ‘’objective performance’’; its value is 0.045, which represents the average return on asset of the years 2011 and 2012. I tried to enter its value (0.045) into ‘’Variable View’’ and precisely ‘’Values’’, but for some reason 0.045 is changed to 0.
>
> ⇒ Could you please advise me on how to enter this variable with its correct value and measure?
>
> • Another issue is that, when I obtained few tables corresponded to ‘’Descriptive Statistics’’, Pearson etc., all the items (statement part of my questionnaire) and variables entered in SPSS ‘’Variable View’’ were included and listed in these tables.
>
> ⇒ I would like to know how to obtain the tables but with only the construct and not all the items that form the construct/scale (like in the summary statistics for the measurement scales in Reinartz et al 2004 journal article shared in this email) for:
> - Descriptive Statistics (with Mean, Standard deviation. Minimum, Maximum etc.)
> - Cronbach Alpha for Reliability Analysis.
> - Pearson correlation and Spearman correlation.
>
> • PLS:
> After downloading the extension module (which was not really easy), I am trying to run PLS in SPSS considering the Equation (1), the Model 1 & 2 (see above and/or article provided) and the standardised PLS coefficients (provided by the authors for the construct model).
>
> ⇒ If you could give me some guidelines to run PLS correctly that will be fantastic; I have tried many times and no success...
>
> • Equation (1):
> (1) Economic performance =
> α +
> + β1 relationship initiation
> + β2 relationship maintenance
> + β3 relationship termination
> + β4 CRM-compatible organizational alignment
> + β5 CRM technology
> + γ1 (CRM-compatible organizational alignment x relationship initiation)

> + γ2 (CRM-compatible organizational alignment x relationship maintenance)
> + γ3 (CRM-compatible organizational alignment x relationship termination)
> + γ4 (CRM technology x relationship initiation)

> + γ5 (CRM technology x relationship maintenance)
> + γ6 (CRM technology x relationship termination)
> + σ1 Investment banks 1
> + σ2 Investment banks 2
> + σ3 Investment banks 3
> + σ4 Investment banks 4
>
> Variables are grouped into:
> • Main effects (β)
> • Interaction effect (γ)
> • Control variables (σ)
> Formative multi-item measures:
> • Relationship initiation, maintenance, relationship termination
> • CRM-compatible organizational alignment
> • CRM technology.
>
> Subject to the economic performance (both objective and perceptual) we obtain two different models:
> • MODEL 1: Economic performance (perceptual)= f(covariates
> • MODEL 2: Economic Performance (objective)= f(covariates
>
> • Standardised PLS coefficients:
>
> INITIATE =
> .389 X IMEASURE + .379 X ACQUISIT + .375 X REGAINTRUST
>
> MAINTAIN =
> .283 X MMEASURE + .340 X RETAIN + .388 X CROSS_UP + .267 X REFERRAL
>
> TERMINATE =
> .367 X TMEASURE + .759 X EXIT
>
>
> • The Survival Book does not explain how to run ''Square roots of Average Variance Extracted (AVE) in the diagonal''; I am currently trying to find it out via blogs, YouTube etc. If anyone could share the steps to obtain AVE that will be nice.
>
>
> • Histograms, Bar Graphs, Boxplot, Line Graphs, Scatterplots etc. are easy to obtain, but for how can I select several variables at the same time.
> ⇒ I would like to know how I could obtain the general construct instead of every single variable that form the he construct/scale.
>
> • I plan to use the Spearman rho and/or Pearson correlation for the Correlation Analysis; however, the Journal article provided above does not include this correlation analysis.
>
> ⇒ Therefore, I would like to know if it is worthwhile to conduct a Correlation Analysis utilising Pearson, Spearman rho. In my opinion, it is as it allows to determining the direction of the relationship between the variables, and the strength of the relationship; but also calculating the coefficient of determination and assessing the significance level.
>
>
> Many thanks, any assistance would be greatly appreciated.
>
> Exchange via Emails might be better, especially for sharing files because I cannot see a link to attached files in this Google Group Page.
>
> ahres...@gmail.com
>
> Many thanks again!
0 new messages