1 | initial version |

This is easy using the SKIPIF command.

Here is an example

```
sample 1 3
read a b
1 2
3 4
1 5
* Stat on entire sample
stat a b
* Set skip if rule and re do.
skipif(a.eq.1)
stat a b
```

2 | No.2 Revision |

This is easy using the SKIPIF command.

Here is an example

```
sample 1 3
read a b
1 2
```~~3 ~~0 4
1 5
* Stat on entire sample
stat a b
* Set skip if rule and re do.
~~skipif(a.eq.1)
~~skipif(a.ne.1)
stat a b

3 | No.3 Revision |

This is easy using the SKIPIF command.

Here is an example

```
sample 1 3
read
```~~a b
~~dummy myvar
1 2
0 4
1 5
* ~~Stat on entire sample
~~Use SKIPIF to calculate statistics for observations only where variable dummy = 1.
skipif(dummy.eq.1)
stat ~~a b
* Set skip if rule and re do.
skipif(a.ne.1)
stat a b
~~myvar

4 | No.4 Revision |

This is easy using the SKIPIF command.

Here is an example

```
sample 1 3
read dummy myvar
1 2
0 4
1 5
* Use SKIPIF to calculate statistics for observations only where variable dummy = 1.
skipif(dummy.eq.1)
stat myvar
```

Welcome to SHAZAM (Double Precision) v11.1 - APR 2014 WIN-NT PAR=112400

...NOTE..CURRENT WORKING DIRECTORY IS: C:\Users\David.SOFTWAREONE\Documents\SHAZAM\Test

sample 1 3

read dummy myvar

...NOTE.. 2 VARIABLES AND 3 OBSERVATIONS STARTING AT OBS 1

* Use SKIPIF to calculate statistics for observations only where variable dummy = 1.

skipif(dummy.eq.1)

...NOTE..OBSERVATION 1 WILL BE SKIPPED

...NOTE..OBSERVATION 3 WILL BE SKIPPED

stat myvar

Name | N | Mean | St. Dev | Variance | Minimum | Maximum | ||

MYVAR | 1 | 4.0000 | 0.0000 | 0.0000 | 4.0000 | 4.0000 |

5 | No.5 Revision |

This is easy using the SKIPIF command.

Here is an example

```
sample 1 3
read dummy myvar
1 2
0 4
1 5
* Use SKIPIF to calculate statistics for observations only where variable dummy = 1.
```~~skipif(dummy.eq.1)
~~skipif(dummy.ne.1)
stat myvar

Welcome to SHAZAM (Double Precision) v11.1 - APR 2014 WIN-NT PAR=112400

...NOTE..CURRENT WORKING DIRECTORY IS: C:\Users\David.SOFTWAREONE\Documents\SHAZAM\Test

sample 1 3

read dummy myvar

...NOTE.. 2 VARIABLES AND 3 OBSERVATIONS STARTING AT OBS 1

* Use SKIPIF to calculate statistics for observations only where variable dummy = 1.

skipif(dummy.eq.1)

...NOTE..OBSERVATION 1 WILL BE SKIPPED

...NOTE..OBSERVATION 3 WILL BE SKIPPED

stat myvar

Name | N | Mean | St. Dev | Variance | Minimum | Maximum | ||

MYVAR | 1 | 4.0000 | 0.0000 | 0.0000 | 4.0000 | 4.0000 |

6 | No.6 Revision |

This is easy using the SKIPIF command.

Here is an ~~example~~example:

```
sample 1 3
read dummy myvar
1 2
0 4
1 5
* Use SKIPIF to calculate statistics for observations only where variable dummy = 1.
skipif(dummy.ne.1)
stat myvar
```

Copyright **SHAZAM Analytics, 2018** Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.